Fix socks proxy with noproxy

currently, if you set socks proxy with the noproxy matching target host, it will hang up since current code didn't check it and will still init a socks connection to the target url host:port.

the first commit add a test case, the second fixes it.