Class: BinProxy::Connection::Filters::Socks::ClientHeader
- Inherits:
-
BinData::Record
- Object
- BinData::Record
- BinProxy::Connection::Filters::Socks::ClientHeader
- Defined in:
- lib/binproxy/connection/filters.rb
Overview
TODO just handles v4/v4a for now
Instance Method Summary collapse
Instance Method Details
#bogus_ip? ⇒ Boolean
87 88 89 90 |
# File 'lib/binproxy/connection/filters.rb', line 87 def bogus_ip? # an IP value of 0.0.0.x (x > 0) is a SOCKSv4a flag for server-side DNS. ip > 0 && ip <= 255 end |
#host_or_ip ⇒ Object
83 84 85 |
# File 'lib/binproxy/connection/filters.rb', line 83 def host_or_ip if host? then host else IPAddr.new(ip, Socket::AF_INET).to_s end end |