* Get human-readable error message for reply code
(reply)
| 389 | * Get human-readable error message for reply code |
| 390 | */ |
| 391 | getReplyErrorMessage (reply) { |
| 392 | switch (reply) { |
| 393 | case REPLY_CODES.GENERAL_FAILURE: |
| 394 | return 'General SOCKS server failure' |
| 395 | case REPLY_CODES.CONNECTION_NOT_ALLOWED: |
| 396 | return 'Connection not allowed by ruleset' |
| 397 | case REPLY_CODES.NETWORK_UNREACHABLE: |
| 398 | return 'Network unreachable' |
| 399 | case REPLY_CODES.HOST_UNREACHABLE: |
| 400 | return 'Host unreachable' |
| 401 | case REPLY_CODES.CONNECTION_REFUSED: |
| 402 | return 'Connection refused' |
| 403 | case REPLY_CODES.TTL_EXPIRED: |
| 404 | return 'TTL expired' |
| 405 | case REPLY_CODES.COMMAND_NOT_SUPPORTED: |
| 406 | return 'Command not supported' |
| 407 | case REPLY_CODES.ADDRESS_TYPE_NOT_SUPPORTED: |
| 408 | return 'Address type not supported' |
| 409 | default: |
| 410 | return `Unknown error code: ${reply}` |
| 411 | } |
| 412 | } |
| 413 | } |
| 414 | |
| 415 | module.exports = { |
no outgoing calls
no test coverage detected