{"id":18751209,"url":"https://github.com/sebyx07/active_proxy","last_synced_at":"2026-05-07T05:34:01.509Z","repository":{"id":62552798,"uuid":"173628158","full_name":"sebyx07/active_proxy","owner":"sebyx07","description":"Ruby proxy fetcher, retries request until completed, provides user agent🚀🚀","archived":false,"fork":false,"pushed_at":"2019-03-06T06:40:23.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-28T23:48:53.038Z","etag":null,"topics":["crawler","http","proxy","rails","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sebyx07.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-03T20:49:22.000Z","updated_at":"2019-03-09T16:07:10.000Z","dependencies_parsed_at":"2022-11-03T04:01:07.639Z","dependency_job_id":null,"html_url":"https://github.com/sebyx07/active_proxy","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebyx07%2Factive_proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebyx07%2Factive_proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebyx07%2Factive_proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sebyx07%2Factive_proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sebyx07","download_url":"https://codeload.github.com/sebyx07/active_proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239638168,"owners_count":19672620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crawler","http","proxy","rails","ruby"],"created_at":"2024-11-07T17:14:55.511Z","updated_at":"2025-11-27T01:30:16.506Z","avatar_url":"https://github.com/sebyx07.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ActiveProxy\n\n![Alt text](https://travis-ci.com/sebyx07/active_proxy.svg?branch=master)\n[![Gem Version](https://badge.fury.io/rb/active_proxy.svg)](https://badge.fury.io/rb/active_proxy)\n\n### Easy to use ruby proxy fetcher with support for multiple http clients. Has auto retry🚀, fetch 🤖user agent\n\n\n```ruby\ngem 'active_proxy'\n```\n\n### Examples\n\n#### HTTParty\n\n```ruby\n    cache = ActiveSupport::Cache::MemoryStore.new(size: 10.megabytes)\n\n    ActiveProxy.call(\"ipify\", cache) do |proxy| # for rails: ActiveProxy.call(\"ipify\", Rails.cache) do |proxy|\n      \n      options = proxy.format_proxy_httparty\n      options[:timeout] = 2\n      options[:headers] = {\n          \"Accept\" =\u003e \"application/json\",\n          \"User-Agent\" =\u003e proxy.user_agent\n      }\n\n      result = HTTParty.get(\"https://api.ipify.org?format=json\", options).body\n      p JSON.parse(result)\n      \n    end\n```\n\n#### Http.rb\n\n```ruby\n    cache = ActiveSupport::Cache::MemoryStore.new(size: 10.megabytes)\n\n    ActiveProxy.call(\"ipify\", cache) do |proxy| # for rails: ActiveProxy.call(\"ipify\", Rails.cache) do |proxy|\n      \n      proxy_arguments = proxy.format_proxy_http\n      headers = {\n        \"Accept\" =\u003e \"application/json\",\n        \"User-Agent\" =\u003e proxy.user_agent\n      }\n\n      result = HTTP.via(*proxy_arguments)\n                   .headers(headers)\n                   .timeout(write: 2, connect: 1, read: 1)\n                   .get(\"https://api.ipify.org?format=json\")\n                   .body\n\n      p JSON.parse(result)      \n      \n    end\n```\n\n#### Typhoeus\n\n\n```ruby\n    cache = ActiveSupport::Cache::MemoryStore.new(size: 10.megabytes)\n\n    ActiveProxy.call(\"ipify\", cache) do |proxy| # for rails: ActiveProxy.call(\"ipify\", Rails.cache) do |proxy|\n      \n      options = proxy.format_proxy_typhoeus\n      options[:timeout] = 2\n      options[:followlocation] = true\n      options[:headers] = {\n        \"Accept\" =\u003e \"application/json\",\n        \"User-Agent\" =\u003e proxy.user_agent\n      }\n      options[:method] = :get\n\n      result = Typhoeus::Request.new(\"https://api.ipify.org?format=json\", options).run.body\n\n      p JSON.parse(result)     \n       \n    end\n```\n\n\n#### custom client\n\n```ruby\n    cache = ActiveSupport::Cache::MemoryStore.new(size: 10.megabytes)\n\n    ActiveProxy.call(\"ipify\", cache) do |proxy| # for rails: ActiveProxy.call(\"ipify\", Rails.cache) do |proxy|\n      \n      options = proxy.current_proxy\n      # then you access the options[:address] and options[:port]\n    end\n```\n\n\n### Custom options\n\n#### User agent\n\nWhen calling `.user_agent` you can pass params, check https://github.com/asconix/user-agent-randomizer\n\n#### Limit retries\n\nCurrent limit is 10.\n\nBecause proxies are unreliable, set a higher number\n\n```ruby\n    ActiveProxy.call(\"ipify\", cache, {max_retries: 100}) do\n    \n    end\n```\n\n\n#### Proxy list\n\nCurrent configuration is `{ filters: { maxtime: \"200\" } }`\n\nYou can check what configuration you can pass https://github.com/nbulaj/proxy_fetcher\n\n```ruby\n    ActiveProxy.call(\"ipify\", cache, {proxy_manager_options: { filters: { maxtime: \"100\" } }}) do\n    \n    end\n```\n\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/active_proxy.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebyx07%2Factive_proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebyx07%2Factive_proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebyx07%2Factive_proxy/lists"}