logstash-filter-ip2proxy 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0cd5f61d6fad06e1ff71bf978ceee7bad7f5560736111f7f7c5dec57e25bf3d4
4
- data.tar.gz: c14c6f57e737bac618f1bb119e349e701cc53b7af1be9f19e823591e40e1ea4a
3
+ metadata.gz: 87fcbfb8ff8f30359feb847bf515396a8c5438af7a311396cb6dbc9b77bc474f
4
+ data.tar.gz: 15e4d42c56188f815de061d6cd7994ae0b6066dfa2243aa25aa70f58f6d787d6
5
5
  SHA512:
6
- metadata.gz: 223f76de27c284c1f65d1215a6db74bd2303af244753cfce641e26ce96436c50e8990b4394d6d641511a483519270d52943d5b10127524bed6fbd4e4a406f021
7
- data.tar.gz: 10c42d26f03161530e9b7e79273b7bbbe549c599df6f61e99342287cad1e3977b63376afa04933d8d90c2735eba6538b1555cd9e246a9d1e0fcc9a289425d33d
6
+ metadata.gz: 16b35d7dbd60b07518e8452584bba4925ab7596ce27a5203129ad31a045d5b43d15444da6f5d938bc7b761a2b9222c27e2e3420b4f112ff1ed120b27139033a5
7
+ data.tar.gz: 84d7b726a22040872e078a8b358bef9193d88f24f2e9541ef17e2e010e89d8e58138c2069a24b8d57552a7203455ba8e1b4cbc49b8e5564e4662150903e739f3
data/Gemfile CHANGED
@@ -1,11 +1,11 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- logstash_path = ENV["LOGSTASH_PATH"] || "../../logstash"
6
- use_logstash_source = ENV["LOGSTASH_SOURCE"] && ENV["LOGSTASH_SOURCE"].to_s == "1"
7
-
8
- if Dir.exist?(logstash_path) && use_logstash_source
9
- gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
10
- gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
11
- end
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ logstash_path = ENV["LOGSTASH_PATH"] || "../../logstash"
6
+ use_logstash_source = ENV["LOGSTASH_SOURCE"] && ENV["LOGSTASH_SOURCE"].to_s == "1"
7
+
8
+ if Dir.exist?(logstash_path) && use_logstash_source
9
+ gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
10
+ gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
11
+ end
data/LICENSE CHANGED
@@ -1,13 +1,13 @@
1
- Copyright (c) 2020 IP2Location.com
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
-
7
- http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
1
+ Copyright (c) 2021 IP2Location.com
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
13
  limitations under the License.
data/README.md CHANGED
@@ -1,78 +1,77 @@
1
- # IP2Proxy Filter Plugin
2
- This is IP2Proxy filter plugin for Logstash that enables Logstash's users to reverse search of IP address to detect VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots, data center ranges and residential proxies using IP2Proxy BIN database. Other information available includes proxy type, country, state, city, ISP, domain name, usage type, AS number, AS name, threats and last seen date. The library took the proxy IP address from **IP2Proxy BIN Data** file.
3
-
4
- For the methods to use IP2Proxy filter plugin with Elastic Stack (Elasticsearch, Filebeat, Logstash, and Kibana), please take a look on this [tutorial](https://blog.ip2location.com/knowledge-base/how-to-use-ip2proxy-filter-plugin-with-elastic-stack).
5
-
6
-
7
- ## Dependencies (IP2PROXY BIN DATA FILE)
8
- This plugin requires IP2Proxy BIN data file to function. You may download the BIN data file at
9
- * IP2Proxy LITE BIN Data (Free): https://lite.ip2location.com
10
- * IP2Proxy Commercial BIN Data (Commercial): https://www.ip2location.com
11
-
12
-
13
- ## Installation
14
- Install this plugin by the following code:
15
- ```
16
- bin/logstash-plugin install logstash-filter-ip2proxy
17
- ```
18
-
19
-
20
- ## Config File Example
21
- ```
22
- input {
23
- beats {
24
- port => "5043"
25
- }
26
- }
27
-
28
- filter {
29
- grok {
30
- match => { "message" => "%{COMBINEDAPACHELOG}"}
31
- }
32
- ip2proxy {
33
- source => "clientip"
34
- }
35
- }
36
-
37
- output {
38
- elasticsearch {
39
- hosts => [ "localhost:9200" ]
40
- }
41
- }
42
- ```
43
-
44
-
45
- ## IP2Proxy Filter Configuration
46
- |Setting|Input type|Required|
47
- |---|---|---|
48
- |source|string|Yes|
49
- |database|a valid filesystem path|No|
50
-
51
- * **source** field is a required setting that containing the IP address or hostname to get the ip information.
52
- * **database** field is an optional setting that containing the path to the IP2Proxy BIN database file.
53
-
54
-
55
- ## Sample Output
56
- |Field|Description|
57
- |---|---|
58
- |ip2proxy.as|the autonomous system (AS) name of proxy's IP address or domain name|
59
- |ip2proxy.asn|the autonomous system number (ASN) of proxy's IP address or domain name|
60
- |ip2proxy.city|the city name of the proxy|
61
- |ip2proxy.country_long|the ISO3166-1 country name of the proxy|
62
- |ip2proxy.country_short|the ISO3166-1 country code (two-characters) of the proxy|
63
- |ip2proxy.domain|the domain name of proxy's IP address or domain name|
64
- |ip2proxy.is_proxy|Check whether if an IP address was a proxy. Returned value:<ul><li>-1 : errors</li><li>0 : not a proxy</li><li>1 : a proxy</li><li>2 : a data center IP address</li></ul>|
65
- |ip2proxy.isp|the ISP name of the proxy|
66
- |ip2proxy.last_seen|the last seen days ago value of proxy's IP address or domain name|
67
- |ip2proxy.proxy_type|the proxy type. Please visit <a href="https://www.ip2location.com/database/px10-ip-proxytype-country-region-city-isp-domain-usagetype-asn-lastseen-threat-residential" target="_blank">IP2Location</a> for the list of proxy types supported|
68
- |ip2proxy.region|the ISO3166-2 region name of the proxy. Please visit <a href="https://www.ip2location.com/free/iso3166-2" target="_blank">ISO3166-2 Subdivision Code</a> for the information of ISO3166-2 supported|
69
- |ip2proxy.thread|the threat type of the proxy|
70
- |ip2proxy.usage_type|the usage type classification of the proxy. Please visit <a href="https://www.ip2location.com/database/px10-ip-proxytype-country-region-city-isp-domain-usagetype-asn-lastseen-threat-residential" target="_blank">IP2Location</a> for the list of usage types supported|
71
-
72
- ![Example of data](https://www.ip2location.com/assets/img/logstash-filter-ip2proxy-screenshot.png?)
73
-
74
-
75
- ## Support
76
- Email: support@ip2location.com
77
-
78
- URL: [https://www.ip2location.com](https://www.ip2location.com)
1
+ # IP2Proxy Filter Plugin
2
+ This is IP2Proxy filter plugin for Logstash that enables Logstash's users to reverse search of IP address to detect VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots, data center ranges and residential proxies using IP2Proxy BIN database. Other information available includes proxy type, country, state, city, ISP, domain name, usage type, AS number, AS name, threats, last seen date and provider names. The library took the proxy IP address from **IP2Proxy BIN Data** file.
3
+
4
+ For the methods to use IP2Proxy filter plugin with Elastic Stack (Elasticsearch, Filebeat, Logstash, and Kibana), please take a look on this [tutorial](https://blog.ip2location.com/knowledge-base/how-to-use-ip2proxy-filter-plugin-with-elastic-stack).
5
+
6
+
7
+ ## Dependencies (IP2PROXY BIN DATA FILE)
8
+ This plugin requires IP2Proxy BIN data file to function. You may download the BIN data file at
9
+ * IP2Proxy LITE BIN Data (Free): https://lite.ip2location.com
10
+ * IP2Proxy Commercial BIN Data (Commercial): https://www.ip2location.com
11
+
12
+
13
+ ## Installation
14
+ Install this plugin by the following code:
15
+ ```
16
+ bin/logstash-plugin install logstash-filter-ip2proxy
17
+ ```
18
+
19
+
20
+ ## Config File Example
21
+ ```
22
+ input {
23
+ beats {
24
+ port => "5043"
25
+ }
26
+ }
27
+
28
+ filter {
29
+ grok {
30
+ match => { "message" => "%{COMBINEDAPACHELOG}"}
31
+ }
32
+ ip2proxy {
33
+ source => "clientip"
34
+ }
35
+ }
36
+
37
+ output {
38
+ elasticsearch {
39
+ hosts => [ "localhost:9200" ]
40
+ }
41
+ }
42
+ ```
43
+
44
+
45
+ ## IP2Proxy Filter Configuration
46
+ |Setting|Input type|Required|
47
+ |---|---|---|
48
+ |source|string|Yes|
49
+ |database|a valid filesystem path|No|
50
+
51
+ * **source** field is a required setting that containing the IP address or hostname to get the ip information.
52
+ * **database** field is an optional setting that containing the path to the IP2Proxy BIN database file.
53
+
54
+
55
+ ## Sample Output
56
+ |Field|Description|
57
+ |---|---|
58
+ |ip2proxy.as|the autonomous system (AS) name of proxy's IP address or domain name|
59
+ |ip2proxy.asn|the autonomous system number (ASN) of proxy's IP address or domain name|
60
+ |ip2proxy.city|the city name of the proxy|
61
+ |ip2proxy.country_long|the ISO3166-1 country name of the proxy|
62
+ |ip2proxy.country_short|the ISO3166-1 country code (two-characters) of the proxy|
63
+ |ip2proxy.domain|the domain name of proxy's IP address or domain name|
64
+ |ip2proxy.is_proxy|Check whether if an IP address was a proxy. Returned value:<ul><li>-1 : errors</li><li>0 : not a proxy</li><li>1 : a proxy</li><li>2 : a data center IP address</li></ul>|
65
+ |ip2proxy.isp|the ISP name of the proxy|
66
+ |ip2proxy.last_seen|the last seen days ago value of proxy's IP address or domain name|
67
+ |ip2proxy.provider|the VPN service provider name if available|
68
+ |ip2proxy.proxy_type|the proxy type. Please visit <a href="https://www.ip2location.com/database/px11-ip-proxytype-country-region-city-isp-domain-usagetype-asn-lastseen-threat-residential-provider" target="_blank">IP2Location</a> for the list of proxy types supported|
69
+ |ip2proxy.region|the ISO3166-2 region name of the proxy. Please visit <a href="https://www.ip2location.com/free/iso3166-2" target="_blank">ISO3166-2 Subdivision Code</a> for the information of ISO3166-2 supported|
70
+ |ip2proxy.thread|the threat type of the proxy|
71
+ |ip2proxy.usage_type|the usage type classification of the proxy. Please visit <a href="https://www.ip2location.com/database/px11-ip-proxytype-country-region-city-isp-domain-usagetype-asn-lastseen-threat-residential-provider" target="_blank">IP2Location</a> for the list of usage types supported|
72
+
73
+
74
+ ## Support
75
+ Email: support@ip2location.com
76
+
77
+ URL: [https://www.ip2location.com](https://www.ip2location.com)
@@ -1,3 +1,3 @@
1
- require 'jar_dependencies'
2
- require_jar('com.ip2proxy.ip2proxy', 'ip2proxy', '3.0.2')
3
- require_jar('org.logstash.filters', 'logstash-filter-ip2proxy', '2.1.0')
1
+ require 'jar_dependencies'
2
+ require_jar('com.ip2proxy.ip2proxy', 'ip2proxy', '3.1.0')
3
+ require_jar('org.logstash.filters', 'logstash-filter-ip2proxy', '2.2.0')
@@ -1,25 +1,25 @@
1
- Gem::Specification.new do |s|
2
-
3
- s.name = 'logstash-filter-ip2proxy'
4
- s.version = '2.1.0'
5
- s.licenses = ['Apache-2.0']
6
- s.summary = "Logstash filter IP2Proxy"
7
- s.description = "IP2Proxy filter plugin for Logstash enables Logstash's users to reverse search of IP address to detect VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots, data center ranges and residential proxies using IP2Proxy BIN database."
8
- s.authors = ["IP2Location"]
9
- s.email = 'support@ip2location.com'
10
- s.homepage = "https://www.ip2location.com"
11
- s.require_paths = ["lib", "vendor/jar-dependencies"]
12
-
13
- # Files
14
- s.files = Dir["lib/**/*",'spec/**/*',"vendor/**/*","vendor/jar-dependencies/**/*.jar","*.gemspec","*.md","Gemfile","LICENSE"]
15
-
16
- # Tests
17
- s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
-
19
- # Special flag to let us know this is actually a logstash plugin
20
- s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" }
21
-
22
- # Gem dependencies
23
- s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
24
- s.add_development_dependency "logstash-devutils"
25
- end
1
+ Gem::Specification.new do |s|
2
+
3
+ s.name = 'logstash-filter-ip2proxy'
4
+ s.version = '2.2.0'
5
+ s.licenses = ['Apache-2.0']
6
+ s.summary = "Logstash filter IP2Proxy"
7
+ s.description = "IP2Proxy filter plugin for Logstash enables Logstash's users to reverse search of IP address to detect VPN servers, open proxies, web proxies, Tor exit nodes, search engine robots, data center ranges and residential proxies using IP2Proxy BIN database."
8
+ s.authors = ["IP2Location"]
9
+ s.email = 'support@ip2location.com'
10
+ s.homepage = "https://www.ip2location.com"
11
+ s.require_paths = ["lib", "vendor/jar-dependencies"]
12
+
13
+ # Files
14
+ s.files = Dir["lib/**/*",'spec/**/*',"vendor/**/*","vendor/jar-dependencies/**/*.jar","*.gemspec","*.md","Gemfile","LICENSE"]
15
+
16
+ # Tests
17
+ s.test_files = s.files.grep(%r{^(test|spec|features)/})
18
+
19
+ # Special flag to let us know this is actually a logstash plugin
20
+ s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" }
21
+
22
+ # Gem dependencies
23
+ s.add_runtime_dependency "logstash-core-plugin-api", "~> 2.0"
24
+ s.add_development_dependency "logstash-devutils"
25
+ end
@@ -1,27 +1,27 @@
1
- # encoding: utf-8
2
- require_relative '../spec_helper'
3
- require "logstash/filters/ip2proxy"
4
-
5
- IP2PROXYDB = ::Dir.glob(::File.expand_path("../../vendor/", ::File.dirname(__FILE__))+"/IP2PROXY-LITE-PX1.BIN").first
6
-
7
- describe LogStash::Filters::IP2Proxy do
8
-
9
- describe "normal test" do
10
- config <<-CONFIG
11
- filter {
12
- ip2proxy {
13
- source => "ip"
14
- #database => "#{IP2PROXYDB}"
15
- }
16
- }
17
- CONFIG
18
-
19
- sample("ip" => "8.8.8.8") do
20
- expect(subject.get("ip2proxy")).not_to be_empty
21
- expect(subject.get("ip2proxy")["country_short"]).to eq("US")
22
- end
23
- end
24
-
25
- end
26
-
1
+ # encoding: utf-8
2
+ require_relative '../spec_helper'
3
+ require "logstash/filters/ip2proxy"
4
+
5
+ IP2PROXYDB = ::Dir.glob(::File.expand_path("../../vendor/", ::File.dirname(__FILE__))+"/IP2PROXY-LITE-PX1.BIN").first
6
+
7
+ describe LogStash::Filters::IP2Proxy do
8
+
9
+ describe "normal test" do
10
+ config <<-CONFIG
11
+ filter {
12
+ ip2proxy {
13
+ source => "ip"
14
+ #database => "#{IP2PROXYDB}"
15
+ }
16
+ }
17
+ CONFIG
18
+
19
+ sample("ip" => "8.8.8.8") do
20
+ expect(subject.get("ip2proxy")).not_to be_empty
21
+ expect(subject.get("ip2proxy")["country_short"]).to eq("US")
22
+ end
23
+ end
24
+
25
+ end
26
+
27
27
  end
data/spec/spec_helper.rb CHANGED
@@ -1,2 +1,2 @@
1
- # encoding: utf-8
2
- require "logstash/devutils/rspec/spec_helper"
1
+ # encoding: utf-8
2
+ require "logstash/devutils/rspec/spec_helper"
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-ip2proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - IP2Location
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-11 00:00:00.000000000 Z
11
+ date: 2021-09-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: logstash-core-plugin-api
@@ -56,8 +56,8 @@ files:
56
56
  - spec/filters/ip2proxy_spec.rb
57
57
  - spec/spec_helper.rb
58
58
  - vendor/IP2PROXY-LITE-PX1.BIN
59
- - vendor/jar-dependencies/com/ip2proxy/ip2proxy/ip2proxy/3.0.2/ip2proxy-3.0.2.jar
60
- - vendor/jar-dependencies/org/logstash/filters/logstash-filter-ip2proxy/2.1.0/logstash-filter-ip2proxy-2.1.0.jar
59
+ - vendor/jar-dependencies/com/ip2proxy/ip2proxy/ip2proxy/3.1.0/ip2proxy-3.1.0.jar
60
+ - vendor/jar-dependencies/org/logstash/filters/logstash-filter-ip2proxy/2.2.0/logstash-filter-ip2proxy-2.2.0.jar
61
61
  homepage: https://www.ip2location.com
62
62
  licenses:
63
63
  - Apache-2.0