* Get human-readable error message for reply code
(reply)
| 10860 | * Get human-readable error message for reply code |
| 10861 | */ |
| 10862 | getReplyErrorMessage(reply) { |
| 10863 | switch (reply) { |
| 10864 | case REPLY_CODES.GENERAL_FAILURE: |
| 10865 | return "General SOCKS server failure"; |
| 10866 | case REPLY_CODES.CONNECTION_NOT_ALLOWED: |
| 10867 | return "Connection not allowed by ruleset"; |
| 10868 | case REPLY_CODES.NETWORK_UNREACHABLE: |
| 10869 | return "Network unreachable"; |
| 10870 | case REPLY_CODES.HOST_UNREACHABLE: |
| 10871 | return "Host unreachable"; |
| 10872 | case REPLY_CODES.CONNECTION_REFUSED: |
| 10873 | return "Connection refused"; |
| 10874 | case REPLY_CODES.TTL_EXPIRED: |
| 10875 | return "TTL expired"; |
| 10876 | case REPLY_CODES.COMMAND_NOT_SUPPORTED: |
| 10877 | return "Command not supported"; |
| 10878 | case REPLY_CODES.ADDRESS_TYPE_NOT_SUPPORTED: |
| 10879 | return "Address type not supported"; |
| 10880 | default: |
| 10881 | return `Unknown error code: ${reply}`; |
| 10882 | } |
| 10883 | } |
| 10884 | }; |
| 10885 | module2.exports = { |
| 10886 | Socks5Client, |
no outgoing calls
no test coverage detected