proxy_rotator.cr v.0.1.1

forked from bbtfr/proxy.cr
A HTTP Proxy rotator written in Crystal

proxy

A HTTP Proxy rotator written in Crystal inspired by Ruby's WEBrick::HTTPProxyServer

Installation

Add this to your application's shard.yml:

dependencies:
  proxy_rotator:
    github: confact/proxy_rotator.cr

Usage

require "http/proxy"

server = HTTP::Proxy::Server.new(8080, [
  HTTP::LogHandler.new,
])

address = server.bind_tcp 8080
puts "Listening on http://#{address}"
server.listen

have a file of proxies named proxylist.txt in same folder as the sample file, like in the samples folder if you want to run that one. you can also change the path to the file by setting the env PROXYLIST_PATH to the path to the file.

The structure is:

ip:port:username:password

one proxy per line

Development

  • Basic HTTP Proxy: GET, POST, PUT, DELETE support
  • Basic HTTP Proxy: OPTIONS support
  • HTTPS Proxy: CONNECT support
  • Make context.request & context.response writable
  • Basic (Proxy) Authorization support
  • MITM HTTPS Proxy

Contributing

  1. Fork it ( https://github.com/bbtfr/proxy/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

  • bbtfr Theo Li - creator, maintainer
  • mamantoha Anton Maminov - Contributor
  • confact Håkan Nylén - proxy rotator maintainer
Repository

proxy_rotator.cr

Owner
Statistic
  • 0
  • 0
  • 0
  • 1
  • 0
  • over 5 years ago
  • September 2, 2019
License

MIT License

Links
Synced at

Sat, 21 Dec 2024 05:20:17 GMT

Languages