Hi,
Writing a basic proxy server is simple, but it does not give full fledged server.
Basic thing that a proxy server provide is
1) it is a interface for browsing clients
2) it may support multiple request at a time/ may not support
3) maintain a session
to achieve this what you need to do
1) create a socket server on some port
2) as soon as you get a connect request from client, you establish a connection with the server - you are trying to proxy.
3) forward all request from client to server, and response from server to client.
you need to redirect input and output streams that's it.
now your proxy server is ready.
but for full functionality you may need more effort.