document SOCKS error codes

This commit is contained in:
David Rose 2003-05-29 22:41:40 +00:00
parent b2c04cf954
commit 2eaf4b99db

View File

@ -1038,6 +1038,20 @@ run_socks_proxy_connect_reply() {
if (reply[1] != 0x00) {
downloader_cat.info()
<< "Connection refused, SOCKS code " << (int)reply[1] << "\n";
/*
Socks error codes (from RFC1928):
o X'00' succeeded
o X'01' general SOCKS server failure
o X'02' connection not allowed by ruleset
o X'03' Network unreachable
o X'04' Host unreachable
o X'05' Connection refused
o X'06' TTL expired
o X'07' Command not supported
o X'08' Address type not supported
o X'09' to X'FF' unassigned
*/
close_connection(); // connection is now bad.
_state = S_try_next_proxy;
return false;