depends on the type of proxy you have to connect:
if you have a http proxy you must make a normal connection and then make requests using the http protocol specified in rfc2068
if you want to connect to a socks proxy (firewall) you will need socks4 and/or socks5 protocol (donno the rcf name)
good work