fix socket connect when using proxy