Tiansen,
The following quote is from the SOCKS5 protocol documentation, RFC-1928:
This new protocol extends the SOCKS Version 4 model to include UDP,
and extends the framework to include provisions for generalized
strong authentication schemes, and extends the addressing scheme to
encompass domain-name and V6 IP addresses.
So, SOCKS4 and SOCKS4a do not have support for UDP as far as I know, and if I recall correctly, Kademlia is UDP based, so I think it will not be possible for it to work under SOCKS4 and SOCKS4a. Could you please check your information about Kad working with SOCKS4? Notice that if your network is accessible from the outer world, a test with a proxy is not valid, you need to test it with a really isolated machine behind a NAT.
On the other hand, Kad should work
very well under a SOCKS5 proxy.
Cheers!