Sabya
Sabya

Reputation: 11894

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 and then use it in your application.

Is there library for the #2 part?

Upvotes: 3

Views: 2235

Answers (3)

Brecht Sanders
Brecht Sanders

Reputation: 7287

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.

Upvotes: 1

strongwillow
strongwillow

Reputation: 338

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

Upvotes: 0

user50049
user50049

Reputation:

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.

Upvotes: 2

Related Questions