check req.on close event
added socks proxy support