HTTP proxy server

懵懂的女人 提交于 2019-12-03 13:27:20

问题


I am beginning work on a very basic HTTP proxy server written in C (Edit: something that just forwards my requests). At this point I am having difficulty in understanding how to proceed.

Any help would be beneficial.


回答1:


Take a look at micro_proxy. It implements all the basic features of an HTTP/HTTPS proxy, in only 260 lines of C code.

Another very simple implementation can be found at Proxy.




回答2:


A proxy server for what protocol? Before you know that, starting coding is not the most beneficial next step.

After you've decided on what protocol to implement, you (probably) need to read up on the sockets API.

Once that's done, there's three major routes to go, using a poll/select-based loop, forking off per-session processes or using threads to shuffle data.



来源:https://stackoverflow.com/questions/1734572/http-proxy-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!