libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] Reverse http-proxy


From: Christian Grothoff
Subject: Re: [libmicrohttpd] Reverse http-proxy
Date: Tue, 05 Feb 2013 22:23:19 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.11) Gecko/20121122 Icedove/10.0.11

On 02/05/2013 10:06 PM, Sven Geggus wrote:
> Hello,
> 
> would it be complex to implement a very simple reverse proxy using
> libmicrohttpd?
> 
> All I would need would be something like this:
> 
> http://myserver/ -> index.html
> http://myserver/foo -> http://localhost:port1
> http://myserver/bar -> http://localhost:port2
> 
> Maybee using something like a combination of libmicrohttpd and libcurl?
> 
> Did anybody already do this?

Not AFAIK, but we have very specific plans to do exactly this in GNUnet
this year --- except that we'll be rewriting the result from libcurl as
it passes the reverse proxy and only go to one particular HTTP server
instead of different targets.

So I fully believe this is possible.   The main "mess" is that you will
have to write special logic for each HTTP method (PUT, POST, etc.) and
convert the inputs and outputs from MHD to CURL and back.  If you just
care about "GET", this should not take much.  If you want to also
support PUT and POST, I expect it to be a bit bigger.

If you are doing a free software implementation of such a reverse proxy,
I might be interested in the code ;-).


Happy hacking!

Christian



reply via email to

[Prev in Thread] Current Thread [Next in Thread]