/usr/lib/ruby/vendor_ruby/em-socksify/errors.rb is in ruby-em-socksify 0.3.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | module EventMachine
module Socksify
class SOCKSError < Exception
def self.define (message)
Class.new(self) do
def initialize
super(message)
end
end
end
ServerFailure = define('general SOCKS server failure')
NotAllowed = define('connection not allowed by ruleset')
NetworkUnreachable = define('Network unreachable')
HostUnreachable = define('Host unreachable')
ConnectionRefused = define('Connection refused')
TTLExpired = define('TTL expired')
CommandNotSupported = define('Command not supported')
AddressTypeNotSupported = define('Address type not supported')
def self.for_response_code(code)
case code.is_a?(String) ? code.ord : code
when 1 then ServerFailure
when 2 then NotAllowed
when 3 then NetworkUnreachable
when 4 then HostUnreachable
when 5 then ConnectionRefused
when 6 then TTLExpired
when 7 then CommandNotSupported
when 8 then AddressTypeNotSupported
else self
end
end
end
end
module Connectify
class CONNECTError < Exception
end
end
end
|