logstash-filter-ip2proxy 2.3.0 → 2.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/logstash/filters/ip2proxy.rb +4 -4
- data/lib/logstash-filter-ip2proxy_jars.rb +2 -2
- data/logstash-filter-ip2proxy.gemspec +1 -1
- data/vendor/jar-dependencies/com/ip2proxy/ip2proxy/ip2proxy/3.4.0/ip2proxy-3.4.0.jar +0 -0
- data/vendor/jar-dependencies/org/logstash/filters/logstash-filter-ip2proxy/2.3.2/logstash-filter-ip2proxy-2.3.2.jar +0 -0
- metadata +8 -9
- data/vendor/jar-dependencies/com/ip2proxy/ip2proxy/ip2proxy/3.2.0/ip2proxy-3.2.0.jar +0 -0
- data/vendor/jar-dependencies/org/logstash/filters/logstash-filter-ip2proxy/2.3.0/logstash-filter-ip2proxy-2.3.0.jar +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f13634facd68b8cccdbd6cc6117ae1ca19203010c7a26209c43d6c78ef2427b
|
4
|
+
data.tar.gz: f02c8d0f4626fc8cd549393ddfc7e416f60dd144a5bad19a0b2bc8507604dbab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8781be17fa99fdcf69042727ab4d518eac2e193e47bad8e5de72de41247959fa73e25f48ab22cff8cea43e27f3aec260b8aaf929e115c720a39fb00a940f4d0f
|
7
|
+
data.tar.gz: 15b88d65bc35baedbe899129d0247896a7244aac49fc5e3229b0cc713296c8f2ff2e6fcdd138bba2fc407e652896b54e096b2c34a9d8b7a5805f693dd3c36066
|
data/README.md
CHANGED
@@ -3,6 +3,8 @@ This is IP2Proxy filter plugin for Logstash that enables Logstash's users to rev
|
|
3
3
|
|
4
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
5
|
|
6
|
+
*Note: This plugin works in Logstash 7 and Logstash 8.*
|
7
|
+
|
6
8
|
|
7
9
|
## Dependencies (IP2PROXY BIN DATA FILE)
|
8
10
|
This plugin requires IP2Proxy BIN data file to function. You may download the BIN data file at
|
@@ -51,7 +51,7 @@ class LogStash::Filters::IP2Proxy < LogStash::Filters::Base
|
|
51
51
|
|
52
52
|
return unless filter?(event)
|
53
53
|
if @use_cache
|
54
|
-
if value =
|
54
|
+
if value = IP2ProxyCache.find(event, ip, @ip2proxyfilter, @cache_size).get('ip2proxy')
|
55
55
|
event.set('ip2proxy', value)
|
56
56
|
filter_matched(event)
|
57
57
|
else
|
@@ -72,7 +72,7 @@ class LogStash::Filters::IP2Proxy < LogStash::Filters::Base
|
|
72
72
|
|
73
73
|
end # class LogStash::Filters::IP2Proxy
|
74
74
|
|
75
|
-
class
|
75
|
+
class IP2ProxyOrderedHash
|
76
76
|
ONE = 1
|
77
77
|
|
78
78
|
attr_reader :times_queried # ip -> times queried
|
@@ -114,12 +114,12 @@ class OrderedHash
|
|
114
114
|
end
|
115
115
|
end
|
116
116
|
|
117
|
-
class
|
117
|
+
class IP2ProxyCache
|
118
118
|
ONE_DAY_IN_SECONDS = 86_400
|
119
119
|
|
120
120
|
@cache = {} # ip -> event
|
121
121
|
@timestamps = {} # ip -> time of caching
|
122
|
-
@times_queried =
|
122
|
+
@times_queried = IP2ProxyOrderedHash.new # ip -> times queried
|
123
123
|
@mutex = Mutex.new
|
124
124
|
|
125
125
|
class << self
|
@@ -1,3 +1,3 @@
|
|
1
1
|
require 'jar_dependencies'
|
2
|
-
require_jar('com.ip2proxy.ip2proxy', 'ip2proxy', '3.
|
3
|
-
require_jar('org.logstash.filters', 'logstash-filter-ip2proxy', '2.3.
|
2
|
+
require_jar('com.ip2proxy.ip2proxy', 'ip2proxy', '3.4.0')
|
3
|
+
require_jar('org.logstash.filters', 'logstash-filter-ip2proxy', '2.3.2')
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-ip2proxy'
|
4
|
-
s.version = '2.3.
|
4
|
+
s.version = '2.3.2'
|
5
5
|
s.licenses = ['Apache-2.0']
|
6
6
|
s.summary = "Logstash filter IP2Proxy"
|
7
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."
|
Binary file
|
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.3.
|
4
|
+
version: 2.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- IP2Location
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: logstash-core-plugin-api
|
@@ -56,15 +56,15 @@ 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.
|
60
|
-
- vendor/jar-dependencies/org/logstash/filters/logstash-filter-ip2proxy/2.3.
|
59
|
+
- vendor/jar-dependencies/com/ip2proxy/ip2proxy/ip2proxy/3.4.0/ip2proxy-3.4.0.jar
|
60
|
+
- vendor/jar-dependencies/org/logstash/filters/logstash-filter-ip2proxy/2.3.2/logstash-filter-ip2proxy-2.3.2.jar
|
61
61
|
homepage: https://www.ip2location.com
|
62
62
|
licenses:
|
63
63
|
- Apache-2.0
|
64
64
|
metadata:
|
65
65
|
logstash_plugin: 'true'
|
66
66
|
logstash_group: filter
|
67
|
-
post_install_message:
|
67
|
+
post_install_message:
|
68
68
|
rdoc_options: []
|
69
69
|
require_paths:
|
70
70
|
- lib
|
@@ -80,9 +80,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '0'
|
82
82
|
requirements: []
|
83
|
-
|
84
|
-
|
85
|
-
signing_key:
|
83
|
+
rubygems_version: 3.3.7
|
84
|
+
signing_key:
|
86
85
|
specification_version: 4
|
87
86
|
summary: Logstash filter IP2Proxy
|
88
87
|
test_files:
|
Binary file
|