ipaccess 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/ChangeLog +18 -0
- data/Manifest.txt +6 -0
- data/README.md +2 -2
- data/Rakefile +1 -1
- data/docs/HISTORY +9 -2
- data/docs/img_ac_for_args.md +1 -0
- data/docs/img_ac_for_socket.md +1 -0
- data/docs/img_relations.md +1 -0
- data/docs/img_setup_origin.md +1 -0
- data/docs/img_setup_origin_tab.md +1 -0
- data/docs/img_view.md +1 -0
- data/ipaccess.gemspec +3 -3
- data/lib/ipaccess/core.rb +2 -2
- data/lib/ipaccess/ip_access_check.rb +10 -10
- metadata +7 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2263fb5801a4e431f8891bd7204ab464d27e26bb
|
|
4
|
+
data.tar.gz: d0ad89f20e97903dd6fb20125b7f5fddf34e7059
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 238a8fa4852f2b8d254f11ee1c6f2bbcd17a82063eec4bc33223a1f65b7968abbd4f464b4d2e0157128a9332a32391bdafcde98c52cb7fa68dc13b880ffeffaf
|
|
7
|
+
data.tar.gz: 3e1816f386efa02aa22998dfbc37f938d20eac196f105df971555b414edb72517b0c87e80049d19a719a2a130672865254e30cffb52dce0f110c7701185958ed
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/ChangeLog
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
commit 9255fe14f97d836580f924c12eaffb9182cffd9e
|
|
2
|
+
Author: Paweł Wilk <siefca@gnu.org>
|
|
3
|
+
Date: Thu Dec 26 13:44:56 2013 +0100
|
|
4
|
+
|
|
5
|
+
Release 1.2.4
|
|
6
|
+
|
|
7
|
+
commit 4a75d6261a2f991666822d5b0cf629fc028915ee
|
|
8
|
+
Author: Paweł Wilk <siefca@gnu.org>
|
|
9
|
+
Date: Thu Dec 26 13:44:05 2013 +0100
|
|
10
|
+
|
|
11
|
+
Static gemspec updated
|
|
12
|
+
|
|
13
|
+
commit 825334e1db04b93b9d13210ac75df8e2fdc24d62
|
|
14
|
+
Author: Paweł Wilk <siefca@gnu.org>
|
|
15
|
+
Date: Thu Dec 26 13:43:15 2013 +0100
|
|
16
|
+
|
|
17
|
+
Documentation updated
|
|
18
|
+
|
|
1
19
|
commit 32b176f52c9a7aa3caf2375215c4ffa6030d5c45
|
|
2
20
|
Author: Paweł Wilk <siefca@gnu.org>
|
|
3
21
|
Date: Thu Dec 26 03:35:07 2013 +0100
|
data/Manifest.txt
CHANGED
|
@@ -19,6 +19,12 @@ docs/images/ipaccess_relations.png
|
|
|
19
19
|
docs/images/ipaccess_setup_origin.png
|
|
20
20
|
docs/images/ipaccess_setup_origin_tab.png
|
|
21
21
|
docs/images/ipaccess_view.png
|
|
22
|
+
docs/img_ac_for_args.md
|
|
23
|
+
docs/img_ac_for_socket.md
|
|
24
|
+
docs/img_relations.md
|
|
25
|
+
docs/img_setup_origin.md
|
|
26
|
+
docs/img_setup_origin_tab.md
|
|
27
|
+
docs/img_view.md
|
|
22
28
|
docs/rdoc.css
|
|
23
29
|
docs/yard-tpl/default/fulldoc/html/css/common.css
|
|
24
30
|
examples/ftp.rb
|
data/README.md
CHANGED
|
@@ -89,7 +89,7 @@ socket = IPAccess::TCPSocket(ip_from_user, 80, acl)
|
|
|
89
89
|
## Source code
|
|
90
90
|
|
|
91
91
|
* https://github.com/siefca/IPAccess
|
|
92
|
-
*
|
|
92
|
+
* `git clone git://github.com/siefca/IPAccess.git`
|
|
93
93
|
|
|
94
94
|
## Gem
|
|
95
95
|
|
|
@@ -97,7 +97,7 @@ socket = IPAccess::TCPSocket(ip_from_user, 80, acl)
|
|
|
97
97
|
|
|
98
98
|
## Installation
|
|
99
99
|
|
|
100
|
-
*
|
|
100
|
+
* `gem install ipaccess`
|
|
101
101
|
|
|
102
102
|
## More information
|
|
103
103
|
|
data/Rakefile
CHANGED
|
@@ -30,7 +30,7 @@ Hoe.plugin :gemspec
|
|
|
30
30
|
|
|
31
31
|
Hoe.spec 'ipaccess' do
|
|
32
32
|
developer "Paweł Wilk", "pw@gnu.org"
|
|
33
|
-
self.version = "1.2.
|
|
33
|
+
self.version = "1.2.4"
|
|
34
34
|
self.rubyforge_name = 'ipaccess'
|
|
35
35
|
self.summary = 'IP Access Control for Ruby'
|
|
36
36
|
self.description = 'This library allows you to control IP access for sockets and other objects'
|
data/docs/HISTORY
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
=== 1.2.4 / 2013-12-26 (Mortal Compat)
|
|
2
|
+
|
|
3
|
+
* 2 major enhancements
|
|
4
|
+
|
|
5
|
+
* Added 2 flags to play nice with proxy in Net::HTTP patch: `:check_only_proxy` and `+check_only_real`
|
|
6
|
+
* Added pre-connect access check in Net::HTTP patch
|
|
7
|
+
|
|
1
8
|
=== 1.2.2 / 2013-12-24 (Mortal Compat)
|
|
2
9
|
|
|
3
10
|
* 1 major enhancement
|
|
@@ -6,8 +13,8 @@
|
|
|
6
13
|
|
|
7
14
|
* 2 bugfixes
|
|
8
15
|
|
|
9
|
-
*
|
|
10
|
-
*
|
|
16
|
+
* Documentation format changed to YARD
|
|
17
|
+
* Fixed ACL initialization bugs
|
|
11
18
|
|
|
12
19
|
=== 1.0.1 / 2009-06-07 (Mother in Law)
|
|
13
20
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
data/docs/img_view.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+

|
data/ipaccess.gemspec
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
# stub: ipaccess 1.2.
|
|
2
|
+
# stub: ipaccess 1.2.4.20131226134446 ruby lib
|
|
3
3
|
|
|
4
4
|
Gem::Specification.new do |s|
|
|
5
5
|
s.name = "ipaccess"
|
|
6
|
-
s.version = "1.2.
|
|
6
|
+
s.version = "1.2.4.20131226134446"
|
|
7
7
|
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
9
9
|
s.authors = ["Pawe\u{142} Wilk"]
|
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
|
12
12
|
s.description = "This library allows you to control IP access for sockets and other objects"
|
|
13
13
|
s.email = ["pw@gnu.org"]
|
|
14
14
|
s.extra_rdoc_files = ["Manifest.txt", "lib/ipaccess/ghost_doc/ghost_doc_acl.rdoc", "lib/ipaccess/ghost_doc/ghost_doc_patched_usage.rdoc"]
|
|
15
|
-
s.files = [".rspec", ".yardopts", "ChangeLog", "LGPL-LICENSE", "Manifest.txt", "README.md", "Rakefile", "docs/COPYING", "docs/FAQ", "docs/HISTORY", "docs/LEGAL", "docs/LGPL", "docs/TODO", "docs/images/ipaccess.png", "docs/images/ipaccess_ac_for_args.png", "docs/images/ipaccess_ac_for_socket.png", "docs/images/ipaccess_logo.png", "docs/images/ipaccess_relations.png", "docs/images/ipaccess_setup_origin.png", "docs/images/ipaccess_setup_origin_tab.png", "docs/images/ipaccess_view.png", "docs/rdoc.css", "docs/yard-tpl/default/fulldoc/html/css/common.css", "examples/ftp.rb", "examples/http.rb", "examples/imap.rb", "examples/open-uri.rb", "examples/pop.rb", "examples/smtp.rb", "examples/tcp_server.rb", "examples/tcp_socket.rb", "examples/telnet.rb", "examples/text_message.rb", "ipaccess.gemspec", "lib/ipaccess.rb", "lib/ipaccess/arm_sockets.rb", "lib/ipaccess/core.rb", "lib/ipaccess/ghost_doc/ghost_doc.rb", "lib/ipaccess/ghost_doc/ghost_doc_acl.rdoc", "lib/ipaccess/ghost_doc/ghost_doc_net_ftp.rb", "lib/ipaccess/ghost_doc/ghost_doc_net_http.rb", "lib/ipaccess/ghost_doc/ghost_doc_net_smtp.rb", "lib/ipaccess/ghost_doc/ghost_doc_net_telnet.rb", "lib/ipaccess/ghost_doc/ghost_doc_patched_usage.rdoc", "lib/ipaccess/ghost_doc/ghost_doc_sockets.rb", "lib/ipaccess/ip_access_check.rb", "lib/ipaccess/ip_access_errors.rb", "lib/ipaccess/ip_access_list.rb", "lib/ipaccess/ip_access_set.rb", "lib/ipaccess/net/ftp.rb", "lib/ipaccess/net/http.rb", "lib/ipaccess/net/https.rb", "lib/ipaccess/net/imap.rb", "lib/ipaccess/net/pop.rb", "lib/ipaccess/net/smtp.rb", "lib/ipaccess/net/telnet.rb", "lib/ipaccess/patches/generic.rb", "lib/ipaccess/patches/net_ftp.rb", "lib/ipaccess/patches/net_http.rb", "lib/ipaccess/patches/net_https.rb", "lib/ipaccess/patches/net_imap.rb", "lib/ipaccess/patches/net_pop.rb", "lib/ipaccess/patches/net_smtp.rb", "lib/ipaccess/patches/net_telnet.rb", "lib/ipaccess/patches/netaddr.rb", "lib/ipaccess/patches/sockets.rb", "lib/ipaccess/socket.rb", "lib/ipaccess/sockets.rb", "spec/ip_access_list_spec.rb", "spec/rcov.opts", "spec/spec.opts", ".gemtest"]
|
|
15
|
+
s.files = [".rspec", ".yardopts", "ChangeLog", "LGPL-LICENSE", "Manifest.txt", "README.md", "Rakefile", "docs/COPYING", "docs/FAQ", "docs/HISTORY", "docs/LEGAL", "docs/LGPL", "docs/TODO", "docs/images/ipaccess.png", "docs/images/ipaccess_ac_for_args.png", "docs/images/ipaccess_ac_for_socket.png", "docs/images/ipaccess_logo.png", "docs/images/ipaccess_relations.png", "docs/images/ipaccess_setup_origin.png", "docs/images/ipaccess_setup_origin_tab.png", "docs/images/ipaccess_view.png", "docs/img_ac_for_args.md", "docs/img_ac_for_socket.md", "docs/img_relations.md", "docs/img_setup_origin.md", "docs/img_setup_origin_tab.md", "docs/img_view.md", "docs/rdoc.css", "docs/yard-tpl/default/fulldoc/html/css/common.css", "examples/ftp.rb", "examples/http.rb", "examples/imap.rb", "examples/open-uri.rb", "examples/pop.rb", "examples/smtp.rb", "examples/tcp_server.rb", "examples/tcp_socket.rb", "examples/telnet.rb", "examples/text_message.rb", "ipaccess.gemspec", "lib/ipaccess.rb", "lib/ipaccess/arm_sockets.rb", "lib/ipaccess/core.rb", "lib/ipaccess/ghost_doc/ghost_doc.rb", "lib/ipaccess/ghost_doc/ghost_doc_acl.rdoc", "lib/ipaccess/ghost_doc/ghost_doc_net_ftp.rb", "lib/ipaccess/ghost_doc/ghost_doc_net_http.rb", "lib/ipaccess/ghost_doc/ghost_doc_net_smtp.rb", "lib/ipaccess/ghost_doc/ghost_doc_net_telnet.rb", "lib/ipaccess/ghost_doc/ghost_doc_patched_usage.rdoc", "lib/ipaccess/ghost_doc/ghost_doc_sockets.rb", "lib/ipaccess/ip_access_check.rb", "lib/ipaccess/ip_access_errors.rb", "lib/ipaccess/ip_access_list.rb", "lib/ipaccess/ip_access_set.rb", "lib/ipaccess/net/ftp.rb", "lib/ipaccess/net/http.rb", "lib/ipaccess/net/https.rb", "lib/ipaccess/net/imap.rb", "lib/ipaccess/net/pop.rb", "lib/ipaccess/net/smtp.rb", "lib/ipaccess/net/telnet.rb", "lib/ipaccess/patches/generic.rb", "lib/ipaccess/patches/net_ftp.rb", "lib/ipaccess/patches/net_http.rb", "lib/ipaccess/patches/net_https.rb", "lib/ipaccess/patches/net_imap.rb", "lib/ipaccess/patches/net_pop.rb", "lib/ipaccess/patches/net_smtp.rb", "lib/ipaccess/patches/net_telnet.rb", "lib/ipaccess/patches/netaddr.rb", "lib/ipaccess/patches/sockets.rb", "lib/ipaccess/socket.rb", "lib/ipaccess/sockets.rb", "spec/ip_access_list_spec.rb", "spec/rcov.opts", "spec/spec.opts", ".gemtest"]
|
|
16
16
|
s.homepage = "https://rubygems.org/gems/ipaccess"
|
|
17
17
|
s.rdoc_options = ["--title", "Ipaccess Documentation", "--quiet"]
|
|
18
18
|
s.require_paths = ["lib"]
|
data/lib/ipaccess/core.rb
CHANGED
|
@@ -99,7 +99,7 @@ require 'ipaccess/ip_access_set'
|
|
|
99
99
|
# To properly understand what are the most important structures mentioned above it's worth
|
|
100
100
|
# to look at the diagram:
|
|
101
101
|
#
|
|
102
|
-
#
|
|
102
|
+
# {include:file:docs/img_view.md}
|
|
103
103
|
#
|
|
104
104
|
# == Usage
|
|
105
105
|
#
|
|
@@ -175,7 +175,7 @@ require 'ipaccess/ip_access_set'
|
|
|
175
175
|
# between the IPAccess::TCPSocket class
|
|
176
176
|
# and other classes from this module:
|
|
177
177
|
#
|
|
178
|
-
#
|
|
178
|
+
# {include:file:docs/img_relations.md}
|
|
179
179
|
|
|
180
180
|
module IPAccess
|
|
181
181
|
|
|
@@ -212,7 +212,7 @@ module IPAccess
|
|
|
212
212
|
removed = super(*addresses)
|
|
213
213
|
return removed
|
|
214
214
|
end
|
|
215
|
-
|
|
215
|
+
|
|
216
216
|
# This method helps with setting up
|
|
217
217
|
# a proper originator for an object
|
|
218
218
|
# that is checked against access set.
|
|
@@ -247,14 +247,14 @@ module IPAccess
|
|
|
247
247
|
# how it works you may
|
|
248
248
|
# look at the workflow diagram:
|
|
249
249
|
#
|
|
250
|
-
#
|
|
251
|
-
#
|
|
250
|
+
# {include:file:docs/img_setup_origin.md}
|
|
251
|
+
#
|
|
252
252
|
# To predict the logic in an easy way
|
|
253
253
|
# you may also find the input/output states
|
|
254
254
|
# table useful:
|
|
255
255
|
#
|
|
256
|
-
#
|
|
257
|
-
#
|
|
256
|
+
# {include:file:docs/img_setup_origin_tab.md}
|
|
257
|
+
#
|
|
258
258
|
# After calling this method you may find
|
|
259
259
|
# a reference to two original objects.
|
|
260
260
|
# First in a +cidr+'s tag and second
|
|
@@ -266,7 +266,7 @@ module IPAccess
|
|
|
266
266
|
# used to fetch IP from (e.g. TCPSocket).
|
|
267
267
|
#
|
|
268
268
|
# This method returns the originator or +nil+.
|
|
269
|
-
|
|
269
|
+
|
|
270
270
|
def setup_originator(cidr, orig=nil, net_obj=nil)
|
|
271
271
|
if orig.nil?
|
|
272
272
|
if (cidr.respond_to?(:tag) && !cidr.tag[:Originator].nil?)
|
|
@@ -285,7 +285,7 @@ module IPAccess
|
|
|
285
285
|
|
|
286
286
|
return orig
|
|
287
287
|
end
|
|
288
|
-
|
|
288
|
+
protected :setup_originator
|
|
289
289
|
|
|
290
290
|
# Raises default exception including important informations like
|
|
291
291
|
# remote IP address, rule that IP matched to, used access list
|
|
@@ -382,7 +382,7 @@ module IPAccess
|
|
|
382
382
|
# In order to understand this method's logic
|
|
383
383
|
# properly you may look at the diagram:
|
|
384
384
|
#
|
|
385
|
-
#
|
|
385
|
+
# {include:file:docs/img_ac_for_args.md}
|
|
386
386
|
|
|
387
387
|
def check(*addresses) # :yields: address, rule, list, addresses, originator
|
|
388
388
|
return addresses if self.empty?
|
|
@@ -411,8 +411,8 @@ module IPAccess
|
|
|
411
411
|
# In order to understand this method's logic
|
|
412
412
|
# properly you may look at the diagram:
|
|
413
413
|
#
|
|
414
|
-
#
|
|
415
|
-
|
|
414
|
+
# {include:file:docs/img_ac_for_socket.md}
|
|
415
|
+
|
|
416
416
|
def check_socket(socket, originator=nil) # :yields: address, rule, list, socket, originator
|
|
417
417
|
if (self.empty? || !socket.respond_to?(:getpeername))
|
|
418
418
|
return socket
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ipaccess
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paweł Wilk
|
|
@@ -201,6 +201,12 @@ files:
|
|
|
201
201
|
- docs/images/ipaccess_setup_origin.png
|
|
202
202
|
- docs/images/ipaccess_setup_origin_tab.png
|
|
203
203
|
- docs/images/ipaccess_view.png
|
|
204
|
+
- docs/img_ac_for_args.md
|
|
205
|
+
- docs/img_ac_for_socket.md
|
|
206
|
+
- docs/img_relations.md
|
|
207
|
+
- docs/img_setup_origin.md
|
|
208
|
+
- docs/img_setup_origin_tab.md
|
|
209
|
+
- docs/img_view.md
|
|
204
210
|
- docs/rdoc.css
|
|
205
211
|
- docs/yard-tpl/default/fulldoc/html/css/common.css
|
|
206
212
|
- examples/ftp.rb
|
metadata.gz.sig
CHANGED
|
Binary file
|