{"id":15649372,"url":"https://github.com/mamantoha/http_proxy","last_synced_at":"2026-02-05T18:00:49.801Z","repository":{"id":26470830,"uuid":"108644596","full_name":"mamantoha/http_proxy","owner":"mamantoha","description":"A HTTP Proxy server and client written in Crystal","archived":false,"fork":false,"pushed_at":"2025-05-06T14:55:34.000Z","size":129,"stargazers_count":41,"open_issues_count":5,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-24T12:24:21.145Z","etag":null,"topics":["crystal","hacktoberfest","http","http-proxy","http-server","proxy-client","proxy-server"],"latest_commit_sha":null,"homepage":"","language":"Crystal","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/mamantoha.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-10-28T11:44:41.000Z","updated_at":"2025-05-06T14:55:37.000Z","dependencies_parsed_at":"2024-03-21T13:29:50.530Z","dependency_job_id":"61b5273a-828e-4e31-9732-f9eaf16c0682","html_url":"https://github.com/mamantoha/http_proxy","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/mamantoha/http_proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fhttp_proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fhttp_proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fhttp_proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fhttp_proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mamantoha","download_url":"https://codeload.github.com/mamantoha/http_proxy/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mamantoha%2Fhttp_proxy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29128621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-05T17:12:17.649Z","status":"ssl_error","status_checked_at":"2026-02-05T17:11:23.670Z","response_time":65,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["crystal","hacktoberfest","http","http-proxy","http-server","proxy-client","proxy-server"],"created_at":"2024-10-03T12:29:27.367Z","updated_at":"2026-02-05T18:00:49.749Z","avatar_url":"https://github.com/mamantoha.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTP::Proxy\n\n![Crystal CI](https://github.com/mamantoha/http_proxy/workflows/Crystal%20CI/badge.svg)\n[![GitHub release](https://img.shields.io/github/release/mamantoha/http_proxy.svg)](https://github.com/mamantoha/http_proxy/releases)\n[![License](https://img.shields.io/github/license/mamantoha/http_proxy.svg)](https://github.com/mamantoha/http_proxy/blob/master/LICENSE)\n\nA HTTP Proxy server and client written in Crystal\n\n## Installation\n\nAdd this to your application's `shard.yml`:\n\n```yaml\ndependencies:\n  http_proxy:\n    github: mamantoha/http_proxy\n```\n\n## Usage\n\n### Server\n\n```crystal\nrequire \"http_proxy\"\n\nhost = \"127.0.0.1\"\nport = 8080\n\nserver = HTTP::Proxy::Server.new\n\naddress = server.bind_tcp(host, port)\nputs \"Listening on http://#{address}\"\nserver.listen\n```\n\n```crystal\nrequire \"http_proxy\"\nrequire \"option_parser\"\n\nhost = \"192.168.0.1\"\nport = 3128\n\nOptionParser.parse! do |opts|\n  opts.on(\"-h HOST\", \"--host HOST\", \"define host to run server\") do |opt|\n    host = opt\n  end\n\n  opts.on(\"-p PORT\", \"--port PORT\", \"define port to run server\") do |opt|\n    port = opt.to_i\n  end\nend\n\nserver = HTTP::Proxy::Server.new(handlers: [\n  HTTP::LogHandler.new,\n]) do |context|\n  context.perform\nend\n\naddress = server.bind_tcp(host, port)\nputs \"Listening on http://#{address}\"\nserver.listen\n```\n\n#### Basic Authentication\n\n```crystal\nserver = HTTP::Proxy::Server.new(handlers: [\n  HTTP::LogHandler.new,\n  HTTP::Proxy::Server::BasicAuthHandler.new(\"user\", \"passwd\"),\n]) do |context|\n  context.request.headers.add(\"X-Forwarded-For\", \"127.0.0.1\")\n  context.perform\nend\n```\n\n### Client\n\n#### Make request with proxy\n\n```crystal\nrequire \"http_proxy\"\n\nproxy_client = HTTP::Proxy::Client.new(\"127.0.0.1\", 8080)\n\nuri = URI.parse(\"http://httpbingo.org\")\nclient = HTTP::Client.new(uri)\nclient.proxy = proxy_client\nresponse = client.get(\"/get\")\n```\n\n#### Client Authentication\n\n```crystal\nuri = URI.parse(\"https://httpbingo.org\")\nproxy_client = HTTP::Proxy::Client.new(\"127.0.0.1\", 8080, username: \"user\", password: \"passwd\")\n\nresponse = HTTP::Client.new(uri) do |client|\n  client.proxy = proxy_client\n  client.get(\"/get\")\nend\n\nputs response.status_code\nputs response.body\n```\n\n## Development\n\n### Proxy server\n\n* [x] Basic HTTP Proxy: GET, POST, PUT, DELETE support\n* [x] Basic HTTP Proxy: OPTIONS support\n* [x] HTTPS Proxy: CONNECT support\n* [x] Make context.request \u0026 context.response writable\n* [x] Basic Authentication\n* [ ] MITM HTTPS Proxy\n\n### Proxy client\n\n* [x] Basic HTTP Proxy: GET, POST, PUT, DELETE support\n* [x] Basic HTTP Proxy: OPTIONS support\n* [x] HTTPS Proxy: CONNECT support\n* [x] Basic Authentication\n\n## Contributing\n\n1. Fork it (\u003chttps://github.com/mamantoha/http_proxy/fork\u003e)\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n\n## Contributors\n\n* [bbtfr](https://github.com/bbtfr) Theo Li - creator, maintainer\n* [mamantoha](https://github.com/mamantoha) Anton Maminov - maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fhttp_proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmamantoha%2Fhttp_proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamantoha%2Fhttp_proxy/lists"}