Proxy with socks server

Hi people,

I'm building a "Cerne proxy server", with TIdMappedPortTCP, it's
working fine.
I'd like to implement a SOCKS 4/5 within proxy, but I hadn't ideia,
how to do this, any suggestion ?
I intend to allow some clients to access some destination, using SOCKS
4/5, destination predefined by me.

larssen