I know what is socks proxy and how does it differ from http proxy. I want to know what is the main difference between socks5 and socks4 proxy.
The SOCKS5 protocol is defined in RFC 1928. It is an extension of the SOCKS4 protocol; it offers more choices for authentication and adds support for IPv6 and UDP, the latter of which can be used for DNS lookups.
And compared to plain SOCKS4 it also has the main feature from SOCKS4a:
SOCKS4a extends the SOCKS4 protocol to allow a client to specify a destination domain name rather than an IP address; this is useful when the client itself cannot resolve the destination host's domain name to an IP address.