开发者

implementing proxy support in C, is there any library for that?

I want to implement proxy support (SOCKS5 and HTTP CONNECT method) in my application. There are two parts that needs to be implemented:

  1. Detection of proxy details (protocol, host, port): I am using libproxy for that.
  2. Connecting to the the proxy server and telling it to relay the packets. Get the connected socket a开发者_如何转开发nd then use it in your application.

Is there library for the #2 part?


You might be able to hack libmicrohttpd into doing what you want without too much effort, at least as far as the user end. I'm not aware of anything that does what you want straight out of the box.


Now there is proxysocket (https://github.com/brechtsanders/proxysocket/) to do exactly that. Supports SOCKS4, SOCKS5 and HTTP CONNECT. The result is a normal connected socket so you don't have to rewrite the rest of your application.


libcurl can receive webpage via proxy. You can send raw http header to it, and let it talk to the proxy

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜