Minimal working implementation of socks on python