/usr/lib/ruby/vendor_ruby/fuzzyurl/protocols.rb is in ruby-fuzzyurl 0.8.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 | class Fuzzyurl::Protocols
PORTS_BY_PROTOCOL = {
'ssh' => '22',
'http' => '80',
'https' => '443'
}
PROTOCOLS_BY_PORT = {
'22' => 'ssh',
'80' => 'http',
'443' => 'https'
}
class << self
def get_port(protocol)
return nil unless protocol
base_protocol = protocol.split('+').last
PORTS_BY_PROTOCOL[base_protocol.to_s]
end
def get_protocol(port)
PROTOCOLS_BY_PORT[port.to_s]
end
end
end
|