[uWSGI] uwsgi as an authentication proxy?

Roberto De Ioris roberto at unbit.it
Tue Apr 8 08:54:11 CEST 2014

> Hello
> Since I can't find a working web proxy for Android to filter web
> pages, I'm thinking of...
> 1. Installing Privoxy on an ARM linux appliance,
> 2. Adding some front-end to authenticate incoming connections (since
> Privoxy doesn't support it, and I'd rather no let anyone connect to
> the appliance from the Net)
> 3. Configuring ProxyDroid on my Android smartphone to go through
> Privoxy on the appliance.
> Here's a diagram:
> http://postimg.org/image/y9opoxme1/
> Since uwsgi has tons of features, I was wondering if it could act as
> that authentication proxy.
> Thank you.
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Hi, yes all of the pieces (except one, unfortunately, see below) are here:

http-socket = :9091

; set async mode + green threads for concurrency (you could use threads
async = 100
ugreen = true

; authenticate clients
route-run = basicauth:the proxy server realm,foo:bar

; black list
route-if = equal:${HTTP_HOST};example.com break:403 Forbidden by the proxy

; add special header (just for fun)

; you could add caching to file or memory here

; here happens the magic (dns must be implemented)
route-run = proxyhttp:${dns[HTTP_HOST]}

The part missing is the translation between hostname and ip addresses. It
is a bit of time i want to develop a c-ares plugin for uWSGI
(https://github.com/unbit/uwsgi/issues/310), if you can help me with
testing i can start working on it today (should not be a big effort)

Roberto De Ioris

More information about the uWSGI mailing list