Sha256: b3b8a0676be8380806e4e6c9b15e13b26df4a3cce5296abcbdc5fbd318406332

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

require 'uri/generic'

module URI
  class Socks < Generic
    DEFAULT_PORT = 1080
    COMPONENT = [:scheme, :userinfo, :host, :port, :query].freeze

    def self.build(args)
      tmp = Util.make_components_hash(self, args)
      super(tmp)
    end
  end

  class Socks4 < Socks
  end

  class Socks4A < Socks
  end

  mapping = {
    'SOCKS' => Socks,
    'SOCKS5' => Socks,
    'SOCKS4' => Socks4,
    'SOCKS4A' => Socks4A
  }
  if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.1.0')
    mapping.each { |scheme, class_name| register_scheme scheme, class_name }
  else
    mapping.each { |scheme, class_name| @@schemes[scheme] = class_name }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
proxifier-fork-1.1.0 lib/uri/socks.rb