net-http-paranoid

This package is port of LWPx::ParanoidAgent written by Brad Fitzpatrick.

Description

If you want to access a host which passed by unstrusted person, you should be careful not to access your LAN computer.

This enables to control Net::HTTP ACL.

Installation

Archive Installation

rake install

Gem Installation

gem install nethttpparanoid

Features/Problems

  • DNS resolv (atodeyaru)

Synopsis

require “net/http” require “net/http/paranoid”

paranoid = Net::HTTP::Paranoid.new paranoid.whitelist << “localhost” paranoid.blacklist << “google.com”

uri = URI(“google.com/”) http = Net::HTTP.new(uri.host, uri.port)

# paranoid.wrap raise NotAllowedHostError # if the host is blacklisted or LAN. paranoid.wrap(http).start do |http| # if the host is allowed http.get end

Author

cho45 <[email protected]>

Copyright

Copyright © 2008 cho45

License

Ruby’s