Python socket proxy