Proxy Specifications

I am looking for some documentation on www proxy servers.   I am looking 
to build a *custom* proxy server, thus, I am looking for a specification 
( or rfc) that details the required features, optional features and 
forbidden features of a www proxy server.

I would appreciate it if you could point me to some documentation.