Code Monkey home page Code Monkey logo

proxy_fetcher's Introduction

Hey / Привет 👋

My name is Nikita, and I'm a senior developer at @azati.

I'm currently working on:

  • OAuth 2 provider as a Rails engine - @doorkeeper and related ecosystem.
  • Proxy lists fetcher and validator - @proxy_fetcher.
  • ... and other OSS.

📫 Reach me out at [email protected]

My GitHub stats

proxy_fetcher's People

Contributors

alexanderadam avatar dependabot-preview[bot] avatar dependabot-support avatar jleal avatar nbulaj avatar salbertson avatar ydakuka avatar yuryroot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

proxy_fetcher's Issues

--timeout flag raises exception with CLI

Hi -

While experimenting with the CLI interface, I found this bug:

ubuntu@a13bff005883:/opt/app$ proxy_fetcher --timeout 1
/usr/local/lib/ruby/gems/2.4.0/gems/proxy_fetcher-0.5.0/bin/proxy_fetcher:44:in `<top (required)>': undefined method `connection_timeout=' for #<ProxyFetcher::Configuration:0x0055ba1a9c99b8> (NoMethodError)
	from /usr/local/bin/proxy_fetcher:22:in `load'
	from /usr/local/bin/proxy_fetcher:22:in `<main>'

Indeed, there is no connection_timeout= method in lib/proxy_fetcher/configuration.rb

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    Ruby (~> 2.3.8.0)

    nokogiri (~> 1.8) was resolved to 1.11.5, which depends on
      Ruby (>= 2.5.0)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Response time

In the clean up process response time for each proxy could be calculated.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    Ruby (~> 2.3.8.0)

    nokogiri (~> 1.8) was resolved to 1.11.6, which depends on
      Ruby (>= 2.5.0)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    Ruby (~> 2.3.8.0)

    nokogiri (~> 1.8) was resolved to 1.11.3, which depends on
      Ruby (>= 2.5.0)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Support for rotating proxies

This gem assumes returned proxy list is not rotated (i.e. if proxy if found non-connecting it is permanently removed from proxy list instead being re-added in rotation period). For rotating proxies invalid proxy should be considered invalid only for rotation period (e.g. 10 minutes, configurable).

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    Ruby (~> 2.3.8.0)

    nokogiri (~> 1.8) was resolved to 1.11.7, which depends on
      Ruby (>= 2.5.0)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

ProxyFetcher::Manager.new results in exception 'Net::ReadTimeout: Net::ReadTimeout'

manager = ProxyFetcher::Manager.new

Net::ReadTimeout: Net::ReadTimeout
from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:158:in rescue in rbuf_fill' from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:152:in rbuf_fill'
from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:134:in readuntil' from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/protocol.rb:144:in readline'
from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/response.rb:39:in read_status_line' from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http/response.rb:28:in read_new'
from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1413:in block in transport_request' from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1410:in catch'
from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1410:in transport_request' from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1383:in request'
from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1376:in block in request' from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:853:in start'
from /Users/leal/.rvm/rubies/ruby-2.2.0/lib/ruby/2.2.0/net/http.rb:1374:in request' from /Users/leal/.rvm/gems/ruby-2.2.0/gems/proxy_fetcher-0.6.4/lib/proxy_fetcher/utils/http_client.rb:38:in fetch'
from /Users/leal/.rvm/gems/ruby-2.2.0/gems/proxy_fetcher-0.6.4/lib/proxy_fetcher/utils/http_client.rb:51:in fetch' from /Users/leal/.rvm/gems/ruby-2.2.0/gems/proxy_fetcher-0.6.4/lib/proxy_fetcher/providers/base.rb:37:in load_document'
... 10 levels...

I was working fine several days ago but today it's raising a exception.

`require': cannot load such file -- proxy-fetcher (LoadError)

ruby runner.rb                    
/Users/username/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- proxy-fetcher (LoadError)
	from /Users/username/.rvm/rubies/ruby-2.4.0/lib/ruby/site_ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require'
	from runner.rb:6:in `<main>'
[~/Desktop]  $ 

the code im trying:

require 'proxy-fetcher'
manager = ProxyFetcher::Manager.new
manager.raw_proxies

ArgumentError:invalid value for Integer(): "08080"

Ruby version: 2.5.0
Gem version: 0.6.3

Code

manager = ProxyFetcher::Manager.new(refresh: false)
manager.cleanup!
manager.refresh_list!(maxtime: '4000')

manager.proxies.each do |proxy|
...
end

Error

ArgumentError:invalid value for Integer(): "08080"
.../proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/free_proxy_list.rb:28:in `Integer'
.../proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/free_proxy_list.rb:28:in `block in to_proxy'
.../proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/free_proxy_list.rb:26:in `tap'
.../proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/free_proxy_list.rb:26:in `to_proxy'
.../proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/base.rb:10:in `block in fetch_proxies!'

Check multiple providers

Is it possible to check multiple providers e.g.

    ProxyFetcher.configure do |config|
      config.provider = [:free_proxy_list, :free_proxy_list_ssl, ...]
    end

Thanks

Support for authenticated proxies

From what I see this gem supports only proxies that don't require Authorization header to be set:

    def initialize(proxy_addr, proxy_port)
      timeout = ProxyFetcher.config.proxy_validation_timeout

      @http = HTTP.follow.via(proxy_addr, proxy_port.to_i).timeout(connect: timeout, read: timeout)
    end

it would be nice if there was such possibility

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler found conflicting requirements for the Ruby version:
  In Gemfile:
    Ruby (~> 2.3.8.0)

    nokogiri (~> 1.8) was resolved to 1.11.4, which depends on
      Ruby (>= 2.5.0)

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

View the update logs.

Integer bug?

i'm just trying out your plugin... and this is what i get:

/usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/free_proxy_list.rb:28:in Integer': invalid value for Integer(): "08080" (ArgumentError) from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/free_proxy_list.rb:28:in block in to_proxy'
from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/free_proxy_list.rb:26:in tap' from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/free_proxy_list.rb:26:in to_proxy'
from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/base.rb:10:in block in fetch_proxies!' from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/base.rb:10:in map'
from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/base.rb:10:in fetch_proxies!' from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/lib/proxy_fetcher/providers/base.rb:15:in fetch_proxies!'
from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/lib/proxy_fetcher/manager.rb:38:in block in refresh_list!' from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/lib/proxy_fetcher/manager.rb:34:in each'
from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/lib/proxy_fetcher/manager.rb:34:in refresh_list!' from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/lib/proxy_fetcher/manager.rb:19:in initialize'
from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/bin/proxy_fetcher:60:in new' from /usr/local/var/rbenv/versions/2.3.3/lib/ruby/gems/2.3.0/gems/proxy_fetcher-0.6.3/bin/proxy_fetcher:60:in <top (required)>'
from /usr/local/var/rbenv/versions/2.3.3/bin/proxy_fetcher:22:in load' from /usr/local/var/rbenv/versions/2.3.3/bin/proxy_fetcher:22:in

'

ProxyFetcher::Client.get Never Returns

This gem looks great but in attempting to use it I can't get ProxyFetcher::Client.get( 'https://example.com/resource') to return anything. In my rails console it just hangs. I'm able to manually create a manager and fetch a list of proxies fine but the Client.get just never returns any results. Is there something I'm missing?

I've tried both the master version and release 0.6.3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.