Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion lib/logstash/inputs/twitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,12 @@ class LogStash::Inputs::Twitter < LogStash::Inputs::Base
# Port where the proxy is listening, by default 3128 (squid)
config :proxy_port, :validate => :number, :default => 3128

# Proxy username to be used when performing authentication
config :proxy_username, :validate => :string

# Proxy password to be used when authenticating
config :proxy_password, :validate => :password

def register
require "twitter"

Expand Down Expand Up @@ -208,8 +214,10 @@ def configure(c)
if @use_proxy
c.proxy = {
proxy_address: @proxy_address,
proxy_port: @proxy_port,
proxy_port: @proxy_port
}
c.proxy[:proxy_username] = @proxy_username if @proxy_username
c.proxy[:proxy_password] = @proxy_password.value if @proxy_password
end
end

Expand Down