Send back more SOCKS5 errors where appropriate.
As a follow up to legacy/trac#12971 (moved), our SOCKS5 code can now send back specific errors in response to requests fairly easily. A quick glance through the code suggests that the following cases (at a minimum) should be changed to do the right thing:
- Invalid/malformed address (
SOCKS5_NOT_ALLOWEDdepending on the case)
- CONNECT command while SafeSocks is set to an IP address (
One could argue that legacy/trac#11138 (moved) would magically fix these things as well, but since returning errors is a one line addition (and the unit tests) per case, there's no reason not to make the changes now.