Created attachment 2656 [details] Initial implementation proposal with a few TODOs that I don't know how to implement - report "bad address type" error if requested address type is not supported - report "ruleset block" error if requested hostname too long - report "ruleset block", "connection refused" or "generic error" if server-side connection attempt failure result is "administratively prohibited", "connect failed" or something else, respectively.
This bug complements bug #2250 which handles one additional error situation
Created attachment 2657 [details] Initial implementation proposal with a few TODOs that I don't know how to implement removes #define that is already added by bug #2250 and not actually needed for this bug
Created attachment 2744 [details] tidied diff I've tidied the diff up a bit, but I think we need some extra support in the channels code to allow the reply to connfailed requests to be sent in a timely manner.
Fixing this is required for Bug 2250 too, but I'm not going to attempt it until the channels code has been refactored a bit.