private_address_check 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of private_address_check might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da10ec0518f085a1c9241a4b46000fe8dbe59d4f
4
- data.tar.gz: 59f1569f6f714c8f574a788baa4b0340d9ab3b88
3
+ metadata.gz: c1a4bcbc9ec82314b86bb620261268077132d6c9
4
+ data.tar.gz: fe1ecc17c73d3cef97a38e9bc845089e42b360f1
5
5
  SHA512:
6
- metadata.gz: 71f1ca3c4423b09cdc8b5807b3e29615bde3e449cd3e293e2ee65399e8210f4b44f6b71e71ec220def219875812dd25f163b7778d3f068c8fae59685179ff239
7
- data.tar.gz: 0d5ee71dac1d33cc70bbebae81a7724da3deb096d658351810cb68a4fd779193402b80aafdc3cef74d2e32c097ce8d24aa3b05997cfeef660c6cad105a54e2f2
6
+ metadata.gz: 6b7551e633389296e49e25687a29fbd066614e37ef103dd6745dc6f7b3a332c3e0c500a1a1eb8196dd46ef8cc38041980b483b49426f531aeea98b05a1de4457
7
+ data.tar.gz: dd232f46857c690672d00a68a245026f1701775f8e34f017ee6fc48a3d04e75ffd7ec89da4ab6ba7e19e276005bbbedea99ba1089036663c751de04e03287e5b
@@ -6,21 +6,35 @@ require "private_address_check/version"
6
6
  module PrivateAddressCheck
7
7
  module_function
8
8
 
9
+ # https://en.wikipedia.org/wiki/Reserved_IP_addresses
9
10
  CIDR_LIST = [
10
- # Loopback
11
- IPAddr.new("127.0.0.0/8"),
12
- IPAddr.new("::1/64"),
13
-
14
- # Link Local,
15
- IPAddr.new("169.254.0.0/16"),
16
-
17
- # RFC 1918
18
- IPAddr.new("10.0.0.0/8"),
19
- IPAddr.new("172.16.0.0/12"),
20
- IPAddr.new("192.168.0.0/16"),
21
-
22
- # RFC 4193
23
- IPAddr.new("fc00::/7"),
11
+ IPAddr.new("127.0.0.0/8"), # Loopback
12
+ IPAddr.new("::1/128"), # Loopback
13
+ IPAddr.new("0.0.0.0/8"), # Current network (only valid as source address)
14
+ IPAddr.new("169.254.0.0/16"), # Link-local
15
+ IPAddr.new("10.0.0.0/8"), # Private network
16
+ IPAddr.new("100.64.0.0/10"), # Shared Address Space
17
+ IPAddr.new("172.16.0.0/12"), # Private network
18
+ IPAddr.new("192.0.0.0/24"), # IETF Protocol Assignments
19
+ IPAddr.new("192.0.2.0/24"), # TEST-NET-1, documentation and examples
20
+ IPAddr.new("192.88.99.0/24"), # IPv6 to IPv4 relay (includes 2002::/16)
21
+ IPAddr.new("192.168.0.0/16"), # Private network
22
+ IPAddr.new("198.18.0.0/15"), # Network benchmark tests
23
+ IPAddr.new("198.51.100.0/24"), # TEST-NET-2, documentation and examples
24
+ IPAddr.new("203.0.113.0/24"), # TEST-NET-3, documentation and examples
25
+ IPAddr.new("224.0.0.0/4"), # IP multicast (former Class D network)
26
+ IPAddr.new("240.0.0.0/4"), # Reserved (former Class E network)
27
+ IPAddr.new("255.255.255.255"), # Broadcast
28
+ IPAddr.new("64:ff9b::/96"), # IPv4/IPv6 translation (RFC 6052)
29
+ IPAddr.new("100::/64"), # Discard prefix (RFC 6666)
30
+ IPAddr.new("2001::/32"), # Teredo tunneling
31
+ IPAddr.new("2001:10::/28"), # Deprecated (previously ORCHID)
32
+ IPAddr.new("2001:20::/28"), # ORCHIDv2
33
+ IPAddr.new("2001:db8::/32"), # Addresses used in documentation and example source code
34
+ IPAddr.new("2002::/16"), # 6to4
35
+ IPAddr.new("fc00::/7"), # Unique local address
36
+ IPAddr.new("fe80::/10"), # Link-local address
37
+ IPAddr.new("ff00::/8") # Multicast
24
38
  ]
25
39
 
26
40
  def private_address?(address)
@@ -1,3 +1,3 @@
1
1
  module PrivateAddressCheck
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: private_address_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Downey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-06 00:00:00.000000000 Z
11
+ date: 2017-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler