Exper.connect is a project mainly written in C, it's free.
connect.c proxy hackery
rogera@mc:~/proj/cnyper/sohorouter.exper/connect.d$ echo -ne "GET / HTTP/1.0 " | ./connect 192.168.1.1 80 HTTP/1.0 401 Unauthorized WWW-Authenticate: Basic realm="NETGEAR WGR614v9" Content-type: text/html
Access to this resource is denied; your client has not supplied the correct authentication.