Test: add socks5 tests

Introduce function pointers for send_data and 
recv_data so they can be replaced for testing.