Type:
Class
Constants:
VERSION : ["2.0.0"]

The current version of ACL

DENY_ALLOW : 0

Default to deny

ALLOW_DENY : 1

Default to allow

Simple Access Control Lists.

Access control lists are composed of “allow” and “deny” halves to control access. Use “all” or “*” to match any address. To match a specific address use any address or address mask that IPAddr can understand.

Example:

list = %w[
  deny all
  allow 192.168.1.1
  allow ::ffff:192.168.1.2
  allow 192.168.1.3
]

# From Socket#peeraddr, see also ACL#allow_socket?
addr = ["AF_INET", 10, "lc630", "192.168.1.3"]

acl = ACL.new
p acl.allow_addr?(addr) # => true

acl = ACL.new(list, ACL::DENY_ALLOW)
p acl.allow_addr?(addr) # => true
add
  • References/Ruby on Rails/Ruby/Classes/ACL/ACL::ACLList

add(str) Instance Public methods Adds str as an

2025-01-10 15:47:30
allow_socket?
  • References/Ruby on Rails/Ruby/Classes/ACL

allow_socket?(soc) Instance Public methods Allow connections from

2025-01-10 15:47:30
match
  • References/Ruby on Rails/Ruby/Classes/ACL/ACL::ACLEntry

match(addr) Instance Public methods Matches addr against this entry

2025-01-10 15:47:30
match
  • References/Ruby on Rails/Ruby/Classes/ACL/ACL::ACLList

match(addr) Instance Public methods Matches addr against each

2025-01-10 15:47:30
new
  • References/Ruby on Rails/Ruby/Classes/ACL/ACL::ACLList

new() Class Public methods Creates an empty

2025-01-10 15:47:30
new
  • References/Ruby on Rails/Ruby/Classes/ACL

new(list=nil, order = DENY_ALLOW) Class Public methods Creates a new

2025-01-10 15:47:30
install_list
  • References/Ruby on Rails/Ruby/Classes/ACL

install_list(list) Instance Public methods Adds list of

2025-01-10 15:47:30
allow_addr?
  • References/Ruby on Rails/Ruby/Classes/ACL

allow_addr?(addr) Instance Public methods Allow connections from addrinfo addr

2025-01-10 15:47:30
new
  • References/Ruby on Rails/Ruby/Classes/ACL/ACL::ACLEntry

new(str) Class Public methods Creates a new entry using str.

2025-01-10 15:47:30