jpmobile-ipaddresses 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/MIT-LICENSE +7 -0
- data/README +0 -0
- data/Rakefile +24 -0
- data/VERSION +1 -0
- data/jpmobile-ipaddresses.gemspec +52 -0
- data/lib/jpmobile-ipaddresses.rb +18 -0
- data/lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb +23 -0
- data/lib/jpmobile/mobile/ip_addresses/au.rb +40 -0
- data/lib/jpmobile/mobile/ip_addresses/docomo.rb +22 -0
- data/lib/jpmobile/mobile/ip_addresses/emobile.rb +15 -0
- data/lib/jpmobile/mobile/ip_addresses/softbank.rb +20 -0
- data/lib/jpmobile/mobile/ip_addresses/willcom.rb +158 -0
- metadata +90 -0
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
pkg
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
Copyright (c) 2006 Yoji Shidara
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README
ADDED
File without changes
|
data/Rakefile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
require 'rake/clean'
|
4
|
+
require 'rake/testtask'
|
5
|
+
require 'rake/rdoctask'
|
6
|
+
require 'fileutils'
|
7
|
+
include FileUtils
|
8
|
+
|
9
|
+
begin
|
10
|
+
require 'jeweler'
|
11
|
+
Jeweler::Tasks.new do |gem|
|
12
|
+
gem.name = "jpmobile-ipaddresses"
|
13
|
+
gem.summary = "Carrier IP Address List for jpmobile"
|
14
|
+
gem.description = "Carrier IP Address List for jpmobile"
|
15
|
+
gem.email = "rust.stnard@gmail.com"
|
16
|
+
gem.homepage = "http://github.com/jpmobile/jpmobile-ipaddresses"
|
17
|
+
gem.authors = ["Shin-ichiro OGAWA"]
|
18
|
+
|
19
|
+
gem.add_development_dependency('jeweler', '>=1.4.0')
|
20
|
+
end
|
21
|
+
rescue LoadError
|
22
|
+
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
23
|
+
end
|
24
|
+
Jeweler::GemcutterTasks.new
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -0,0 +1,52 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{jpmobile-ipaddresses}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Shin-ichiro OGAWA"]
|
12
|
+
s.date = %q{2010-09-06}
|
13
|
+
s.description = %q{Carrier IP Address List for jpmobile}
|
14
|
+
s.email = %q{rust.stnard@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"README"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
".gitignore",
|
20
|
+
"MIT-LICENSE",
|
21
|
+
"README",
|
22
|
+
"Rakefile",
|
23
|
+
"VERSION",
|
24
|
+
"jpmobile-ipaddresses.gemspec",
|
25
|
+
"lib/jpmobile-ipaddresses.rb",
|
26
|
+
"lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb",
|
27
|
+
"lib/jpmobile/mobile/ip_addresses/au.rb",
|
28
|
+
"lib/jpmobile/mobile/ip_addresses/docomo.rb",
|
29
|
+
"lib/jpmobile/mobile/ip_addresses/emobile.rb",
|
30
|
+
"lib/jpmobile/mobile/ip_addresses/softbank.rb",
|
31
|
+
"lib/jpmobile/mobile/ip_addresses/willcom.rb"
|
32
|
+
]
|
33
|
+
s.homepage = %q{http://github.com/jpmobile/jpmobile-ipaddresses}
|
34
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
35
|
+
s.require_paths = ["lib"]
|
36
|
+
s.rubygems_version = %q{1.3.7}
|
37
|
+
s.summary = %q{Carrier IP Address List for jpmobile}
|
38
|
+
|
39
|
+
if s.respond_to? :specification_version then
|
40
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
41
|
+
s.specification_version = 3
|
42
|
+
|
43
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
44
|
+
s.add_development_dependency(%q<jeweler>, [">= 1.4.0"])
|
45
|
+
else
|
46
|
+
s.add_dependency(%q<jeweler>, [">= 1.4.0"])
|
47
|
+
end
|
48
|
+
else
|
49
|
+
s.add_dependency(%q<jeweler>, [">= 1.4.0"])
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
$:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) ||
|
3
|
+
$:.include?(File.expand_path(File.dirname(__FILE__)))
|
4
|
+
|
5
|
+
module Jpmobile
|
6
|
+
module Mobile
|
7
|
+
module IpAddresses
|
8
|
+
autoload :AbstractIpAddresses, 'jpmobile/mobile/ip_addresses/abstract_ip_addresses'
|
9
|
+
autoload :Docomo, 'jpmobile/mobile/ip_addresses/docomo'
|
10
|
+
autoload :Au, 'jpmobile/mobile/ip_addresses/au'
|
11
|
+
autoload :Softbank, 'jpmobile/mobile/ip_addresses/softbank'
|
12
|
+
autoload :Vodafone, 'jpmobile/mobile/ip_addresses/softbank'
|
13
|
+
autoload :Willcom, 'jpmobile/mobile/ip_addresses/willcom'
|
14
|
+
autoload :Ddipocket, 'jpmobile/mobile/ip_addresses/willcom'
|
15
|
+
autoload :Emobile, 'jpmobile/mobile/ip_addresses/emobile'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Jpmobile
|
2
|
+
module Mobile
|
3
|
+
module IpAddresses
|
4
|
+
class AbstractIpAddresses
|
5
|
+
def valid_ip?(remote_ip_str)
|
6
|
+
begin
|
7
|
+
remote_ip = IPAddr.new(remote_ip_str)
|
8
|
+
rescue
|
9
|
+
return false
|
10
|
+
end
|
11
|
+
|
12
|
+
self.class.ip_address_list.any? {|ip| ip.include?(remote_ip)}
|
13
|
+
end
|
14
|
+
|
15
|
+
class << self
|
16
|
+
def ip_address_list
|
17
|
+
[]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Jpmobile
|
2
|
+
module Mobile
|
3
|
+
module IpAddresses
|
4
|
+
class Au < AbstractIpAddresses
|
5
|
+
class << self
|
6
|
+
def ip_address_list
|
7
|
+
@@ip_address_list ||= [
|
8
|
+
"210.230.128.224/28",
|
9
|
+
"121.111.227.160/27",
|
10
|
+
"61.117.1.0/28",
|
11
|
+
"219.108.158.0/27",
|
12
|
+
"219.125.146.0/28",
|
13
|
+
"61.117.2.32/29",
|
14
|
+
"61.117.2.40/29",
|
15
|
+
"219.108.158.40/29",
|
16
|
+
"219.125.148.0/25",
|
17
|
+
"222.5.63.0/25",
|
18
|
+
"222.5.63.128/25",
|
19
|
+
"222.5.62.128/25",
|
20
|
+
"59.135.38.128/25",
|
21
|
+
"219.108.157.0/25",
|
22
|
+
"219.125.145.0/25",
|
23
|
+
"121.111.231.0/25",
|
24
|
+
"121.111.227.0/25",
|
25
|
+
"118.152.214.192/26",
|
26
|
+
"118.159.131.0/25",
|
27
|
+
"118.159.133.0/25",
|
28
|
+
"118.159.132.160/27",
|
29
|
+
"111.86.142.0/26",
|
30
|
+
"111.86.141.64/26",
|
31
|
+
"111.86.141.128/26",
|
32
|
+
"111.86.141.192/26",
|
33
|
+
"118.159.133.192/26"
|
34
|
+
].map {|ip| IPAddr.new(ip) }
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
module Jpmobile
|
2
|
+
module Mobile
|
3
|
+
module IpAddresses
|
4
|
+
class Docomo < AbstractIpAddresses
|
5
|
+
class << self
|
6
|
+
def ip_address_list
|
7
|
+
@@ip_address_list ||= [
|
8
|
+
"210.153.84.0/24",
|
9
|
+
"210.136.161.0/24",
|
10
|
+
"210.153.86.0/24",
|
11
|
+
"124.146.174.0/24",
|
12
|
+
"124.146.175.0/24",
|
13
|
+
"202.229.176.0/24",
|
14
|
+
"202.229.177.0/24",
|
15
|
+
"202.229.178.0/24"
|
16
|
+
].map {|ip| IPAddr.new(ip)}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Jpmobile
|
2
|
+
module Mobile
|
3
|
+
module IpAddresses
|
4
|
+
class Softbank < AbstractIpAddresses
|
5
|
+
class << self
|
6
|
+
def ip_address_list
|
7
|
+
@@ip_address_list ||= [
|
8
|
+
"123.108.237.0/27",
|
9
|
+
"202.253.96.224/27",
|
10
|
+
"210.146.7.192/26",
|
11
|
+
"210.175.1.128/25"
|
12
|
+
].map {|ip| IPAddr.new(ip) }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
class Vodafone < Softbank
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,158 @@
|
|
1
|
+
module Jpmobile
|
2
|
+
module Mobile
|
3
|
+
module IpAddresses
|
4
|
+
class Willcom < AbstractIpAddresses
|
5
|
+
class << self
|
6
|
+
def ip_address_list
|
7
|
+
@@ip_address_list ||= [
|
8
|
+
"61.198.128.0/24",
|
9
|
+
"61.198.129.0/24",
|
10
|
+
"61.198.130.0/24",
|
11
|
+
"61.198.131.0/24",
|
12
|
+
"61.198.132.0/24",
|
13
|
+
"61.198.133.0/24",
|
14
|
+
"61.198.134.0/24",
|
15
|
+
"61.198.135.0/24",
|
16
|
+
"61.198.136.0/24",
|
17
|
+
"61.198.137.0/24",
|
18
|
+
"61.198.138.100/32",
|
19
|
+
"61.198.138.101/32",
|
20
|
+
"61.198.138.102/32",
|
21
|
+
"61.198.138.103/32",
|
22
|
+
"61.198.139.0/29",
|
23
|
+
"61.198.139.128/27",
|
24
|
+
"61.198.139.160/28",
|
25
|
+
"61.198.140.0/24",
|
26
|
+
"61.198.141.0/24",
|
27
|
+
"61.198.142.0/24",
|
28
|
+
"61.198.143.0/24",
|
29
|
+
"61.198.160.0/24",
|
30
|
+
"61.198.161.0/24",
|
31
|
+
"61.198.162.0/24",
|
32
|
+
"61.198.163.0/24",
|
33
|
+
"61.198.164.0/24",
|
34
|
+
"61.198.165.0/24",
|
35
|
+
"61.198.166.0/24",
|
36
|
+
"61.198.168.0/24",
|
37
|
+
"61.198.169.0/24",
|
38
|
+
"61.198.170.0/24",
|
39
|
+
"61.198.171.0/24",
|
40
|
+
"61.198.172.0/24",
|
41
|
+
"61.198.173.0/24",
|
42
|
+
"61.198.174.0/24",
|
43
|
+
"61.198.175.0/24",
|
44
|
+
"61.198.248.0/24",
|
45
|
+
"61.198.249.0/24",
|
46
|
+
"61.198.250.0/24",
|
47
|
+
"61.198.251.0/24",
|
48
|
+
"61.198.252.0/24",
|
49
|
+
"61.198.253.0/24",
|
50
|
+
"61.198.254.0/24",
|
51
|
+
"61.198.255.0/24",
|
52
|
+
"61.204.0.0/24",
|
53
|
+
"61.204.2.0/24",
|
54
|
+
"61.204.3.0/25",
|
55
|
+
"61.204.3.128/25",
|
56
|
+
"61.204.4.0/24",
|
57
|
+
"61.204.5.0/24",
|
58
|
+
"61.204.6.0/25",
|
59
|
+
"61.204.6.128/25",
|
60
|
+
"61.204.7.0/25",
|
61
|
+
"61.204.92.0/24",
|
62
|
+
"61.204.93.0/24",
|
63
|
+
"61.204.94.0/24",
|
64
|
+
"61.204.95.0/24",
|
65
|
+
"114.20.49.0/24",
|
66
|
+
"114.20.50.0/24",
|
67
|
+
"114.20.51.0/24",
|
68
|
+
"114.20.52.0/24",
|
69
|
+
"114.20.53.0/24",
|
70
|
+
"114.20.54.0/24",
|
71
|
+
"114.20.55.0/24",
|
72
|
+
"114.20.56.0/24",
|
73
|
+
"114.20.57.0/24",
|
74
|
+
"114.20.58.0/24",
|
75
|
+
"114.20.59.0/24",
|
76
|
+
"114.20.60.0/24",
|
77
|
+
"114.20.61.0/24",
|
78
|
+
"114.20.62.0/24",
|
79
|
+
"114.20.63.0/24",
|
80
|
+
"114.20.64.0/24",
|
81
|
+
"114.20.65.0/24",
|
82
|
+
"114.20.66.0/24",
|
83
|
+
"114.20.67.0/24",
|
84
|
+
"114.21.255.0/27",
|
85
|
+
"125.28.0.0/24",
|
86
|
+
"125.28.1.0/24",
|
87
|
+
"125.28.15.0/24",
|
88
|
+
"125.28.16.0/24",
|
89
|
+
"125.28.17.0/24",
|
90
|
+
"125.28.2.0/24",
|
91
|
+
"125.28.3.0/24",
|
92
|
+
"125.28.4.0/24",
|
93
|
+
"125.28.5.0/24",
|
94
|
+
"125.28.8.0/24",
|
95
|
+
"210.168.246.0/24",
|
96
|
+
"210.168.247.0/24",
|
97
|
+
"210.169.92.0/24",
|
98
|
+
"210.169.93.0/24",
|
99
|
+
"210.169.94.0/24",
|
100
|
+
"210.169.95.0/24",
|
101
|
+
"210.169.96.0/24",
|
102
|
+
"210.169.97.0/24",
|
103
|
+
"210.169.98.0/24",
|
104
|
+
"210.169.99.0/24",
|
105
|
+
"211.126.192.128/25",
|
106
|
+
"211.18.232.0/24",
|
107
|
+
"211.18.233.0/24",
|
108
|
+
"211.18.234.0/24",
|
109
|
+
"211.18.235.0/24",
|
110
|
+
"211.18.236.0/24",
|
111
|
+
"211.18.237.0/24",
|
112
|
+
"219.108.10.0/24",
|
113
|
+
"219.108.11.0/24",
|
114
|
+
"219.108.12.0/24",
|
115
|
+
"219.108.13.0/24",
|
116
|
+
"219.108.14.0/24",
|
117
|
+
"219.108.15.0/24",
|
118
|
+
"219.108.7.0/24",
|
119
|
+
"219.108.8.0/24",
|
120
|
+
"219.108.9.0/24",
|
121
|
+
"221.119.0.0/24",
|
122
|
+
"221.119.1.0/24",
|
123
|
+
"221.119.2.0/24",
|
124
|
+
"221.119.3.0/24",
|
125
|
+
"221.119.4.0/24",
|
126
|
+
"221.119.6.0/24",
|
127
|
+
"221.119.7.0/24",
|
128
|
+
"221.119.8.0/24",
|
129
|
+
"221.119.9.0/24",
|
130
|
+
"114.20.49.0/24",
|
131
|
+
"114.20.50.0/24",
|
132
|
+
"114.20.51.0/24",
|
133
|
+
"114.20.52.0/24",
|
134
|
+
"114.20.53.0/24",
|
135
|
+
"114.20.54.0/24",
|
136
|
+
"114.20.55.0/24",
|
137
|
+
"114.20.56.0/24",
|
138
|
+
"114.20.57.0/24",
|
139
|
+
"114.20.58.0/24",
|
140
|
+
"114.20.59.0/24",
|
141
|
+
"114.20.60.0/24",
|
142
|
+
"114.20.61.0/24",
|
143
|
+
"114.20.62.0/24",
|
144
|
+
"114.20.63.0/24",
|
145
|
+
"114.20.64.0/24",
|
146
|
+
"114.20.65.0/24",
|
147
|
+
"114.20.66.0/24",
|
148
|
+
"114.20.67.0/24",
|
149
|
+
"114.21.255.0/27"
|
150
|
+
].map {|ip| IPAddr.new(ip) }
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
154
|
+
class Ddipocket < Willcom
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
158
|
+
end
|
metadata
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jpmobile-ipaddresses
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Shin-ichiro OGAWA
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2010-09-06 00:00:00 +09:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: jeweler
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 1
|
30
|
+
- 4
|
31
|
+
- 0
|
32
|
+
version: 1.4.0
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
description: Carrier IP Address List for jpmobile
|
36
|
+
email: rust.stnard@gmail.com
|
37
|
+
executables: []
|
38
|
+
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files:
|
42
|
+
- README
|
43
|
+
files:
|
44
|
+
- .gitignore
|
45
|
+
- MIT-LICENSE
|
46
|
+
- README
|
47
|
+
- Rakefile
|
48
|
+
- VERSION
|
49
|
+
- jpmobile-ipaddresses.gemspec
|
50
|
+
- lib/jpmobile-ipaddresses.rb
|
51
|
+
- lib/jpmobile/mobile/ip_addresses/abstract_ip_addresses.rb
|
52
|
+
- lib/jpmobile/mobile/ip_addresses/au.rb
|
53
|
+
- lib/jpmobile/mobile/ip_addresses/docomo.rb
|
54
|
+
- lib/jpmobile/mobile/ip_addresses/emobile.rb
|
55
|
+
- lib/jpmobile/mobile/ip_addresses/softbank.rb
|
56
|
+
- lib/jpmobile/mobile/ip_addresses/willcom.rb
|
57
|
+
has_rdoc: true
|
58
|
+
homepage: http://github.com/jpmobile/jpmobile-ipaddresses
|
59
|
+
licenses: []
|
60
|
+
|
61
|
+
post_install_message:
|
62
|
+
rdoc_options:
|
63
|
+
- --charset=UTF-8
|
64
|
+
require_paths:
|
65
|
+
- lib
|
66
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
74
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
|
+
none: false
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
segments:
|
80
|
+
- 0
|
81
|
+
version: "0"
|
82
|
+
requirements: []
|
83
|
+
|
84
|
+
rubyforge_project:
|
85
|
+
rubygems_version: 1.3.7
|
86
|
+
signing_key:
|
87
|
+
specification_version: 3
|
88
|
+
summary: Carrier IP Address List for jpmobile
|
89
|
+
test_files: []
|
90
|
+
|