New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support proxy #44
Support proxy #44
Conversation
Thank you very much. |
Thank you very much! |
I am not having luck getting this to work. I tried the following in my config:
But I get this warning in my td-agent.log file:
I also tried with the following four environment variables both set to the proper value and also clear. What ends up happening with environment variables cleared and without the proxy taking affect above is the request to twitter IP/port times out. Here is a fragment of my log with all http_proxy env variables cleared and tag in the configuration file:
|
@okkez
|
fluent-plugin-twitter 0.6.1 does not support |
I see... since it was merged in April, I thought it would be in latest release. I will try to manually patch my files with the necessary changes then.. Since the docs do mention this, might either want to rev the product or comment in the docs that the version for proxy is not released yet. Thank You. And thank you for responding so quickly. I've been banging my head on this one for hours. |
So my not used message went away after patching the changed files in this PR, but I still get timout connecting to Twitter both with and without setting http_proxy/https_proxy. Have not found any ideas via Google search, so may need to just abandon this. |
I've written some sample code for testing twitter gem's proxy support. REST API works: client = Twitter::REST::Client.new do |config|
config.consumer_key = "xxx"
config.consumer_secret = "xxx"
config.access_token = "xxx"
config.access_token_secret = "xxx"
config.proxy = {
uri: Addressable::URI.parse("http://localhost:8080")
}
end
client.search("Ruby", result_type: "recent").take(3).each do |tweet|
puts tweet.text
end Streaming API doesn't work: client = Twitter::Streaming::Client.new do |config|
config.consumer_key = "xxx"
config.consumer_secret = "xxx"
config.access_token = "xxx"
config.access_token_secret = "xxx"
config.proxy = {
#uri: Addressable::URI.parse("http://localhost:8080")
# host: "127.0.0.1",
# port: 8080,
proxy_address: "127.0.0.1",
proxy_port: 8080,
}
end
client.filter(track: "zipper") do |o|
puts o.text
end The reason: twitter gem's
|
I got following error:
|
See also sferik/twitter-ruby#639 |
twitter API support only TLS. but twitter gem does not support TLS connection with proxy. |
Thank you for investigating the proxy behavior. 🙇 |
No, there isn't, for now. |
See https://github.com/sferik/twitter/blob/master/examples/Configuration.md#using-a-proxy
Fix #27, #38