You need to find out what protocol your proxy server is using, its most likely socks4 or socks5.
Theres not much to know when it comes to socks4, not sure about socks5 but, basicly there are 2 commands, CONNECT and BIND, get to use google to search for the socks4 or 5 rfc, Its not much reading as its a simple protocol.