Class: IPAccess::SOCKSSocket

Inherits:
SOCKSSocket
  • Object
show all
Includes:
Patches::SOCKSSocket
Defined in:
lib/ipaccess/ghost_doc/ghost_doc_sockets.rb,
lib/ipaccess/socket.rb

Overview

SOCKSSocket class with IP access control. It uses output access lists.

This class acts the same way as SOCKSSocket class but provides special member called acl and a few new instance methods for controlling IP access.

:include:ghost_doc_patched_usage.rb

This documentation doesn’t cover description of all class and instance methods of the original SOCKSSocket class, just the patched variants that make use of IP access control.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#aclObject

This member keeps the information about currently used access set. You may use it to do low-level operations on IPAccess::Set object associated with instance. You cannot however call any of global access set operations – to do that use IPAccess::Set.Global contant referencing to global ACL.



324
325
326
# File 'lib/ipaccess/ghost_doc/ghost_doc_sockets.rb', line 324

def acl
  @acl
end

Instance Method Details

#acl_recheckObject

This method allows you to re-check access on demad. It uses internal socket’s address and access set assigned to an object. It will close your communication session before throwing an exception in case of denied access – you can prevent it by setting the flag opened_on_deny to true. The flag can be set while initializing object (through argument :opened_on_deny) or by setting the attribute.



335
336
337
# File 'lib/ipaccess/ghost_doc/ghost_doc_sockets.rb', line 335

def acl_recheck
  # Real code hidden.
end

#blacklistObject Also known as: add_black, deny, block

:include:ghost_doc_p_blacklist.rb



269
# File 'lib/ipaccess/ghost_doc/ghost_doc_sockets.rb', line 269

def blacklist; end

#blacklist!Object Also known as: add_black!, deny!, block!

:include:ghost_doc_p_blacklist_e.rb



266
# File 'lib/ipaccess/ghost_doc/ghost_doc_sockets.rb', line 266

def blacklist!; end

#unblacklistObject Also known as: unblock, del_black

:include:ghost_doc_p_unblacklist.rb



281
# File 'lib/ipaccess/ghost_doc/ghost_doc_sockets.rb', line 281

def unblacklist; end

#unblacklist!Object Also known as: unblock!, del_black!

:include:ghost_doc_p_unblacklist_e.rb



278
# File 'lib/ipaccess/ghost_doc/ghost_doc_sockets.rb', line 278

def unblacklist!; end

#unwhitelistObject Also known as: del_white

:include:ghost_doc_p_unwhitelist.rb



275
# File 'lib/ipaccess/ghost_doc/ghost_doc_sockets.rb', line 275

def unwhitelist; end

#unwhitelist!Object Also known as: del_white!

:include:ghost_doc_p_unwhitelist_e.rb



272
# File 'lib/ipaccess/ghost_doc/ghost_doc_sockets.rb', line 272

def unwhitelist!; end

#whitelistObject

:include:ghost_doc_p_whitelist.rb



263
# File 'lib/ipaccess/ghost_doc/ghost_doc_sockets.rb', line 263

def whitelist; end

#whitelist!Object

:include:ghost_doc_p_whitelist_e.rb



260
# File 'lib/ipaccess/ghost_doc/ghost_doc_sockets.rb', line 260

def whitelist!; end