{"id":18456116,"url":"https://github.com/jjeffcaii/capybara","last_synced_at":"2025-04-08T04:34:23.229Z","repository":{"id":249539416,"uuid":"815016170","full_name":"jjeffcaii/capybara","owner":"jjeffcaii","description":"A modern reverse proxy in Rust.","archived":false,"fork":false,"pushed_at":"2024-11-30T15:03:53.000Z","size":327,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T12:50:53.679Z","etag":null,"topics":["envoy","nginx","reverse-proxy","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jjeffcaii.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2024-06-14T07:10:13.000Z","updated_at":"2025-02-19T02:24:38.000Z","dependencies_parsed_at":"2024-08-05T18:02:15.542Z","dependency_job_id":"14044fef-5fcd-4416-9878-e397aee201cb","html_url":"https://github.com/jjeffcaii/capybara","commit_stats":null,"previous_names":["jjeffcaii/capybara"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjeffcaii%2Fcapybara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjeffcaii%2Fcapybara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjeffcaii%2Fcapybara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jjeffcaii%2Fcapybara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jjeffcaii","download_url":"https://codeload.github.com/jjeffcaii/capybara/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247779796,"owners_count":20994569,"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":["envoy","nginx","reverse-proxy","rust"],"created_at":"2024-11-06T08:10:16.529Z","updated_at":"2025-04-08T04:34:23.220Z","avatar_url":"https://github.com/jjeffcaii.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo](./docs/capybara.jpg)\n\n# Capybara\n\n![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/jjeffcaii/capybara/rust.yml)\n[![Codecov](https://img.shields.io/codecov/c/github/jjeffcaii/capybara)](https://app.codecov.io/gh/jjeffcaii/capybara)\n[![Crates.io Version](https://img.shields.io/crates/v/capybara-bin)](https://crates.io/crates/capybara-bin)\n[![Crates.io Total Downloads](https://img.shields.io/crates/d/capybara-bin)](https://crates.io/crates/capybara-bin)\n![GitHub Tag](https://img.shields.io/github/v/tag/jjeffcaii/capybara)\n![GitHub License](https://img.shields.io/github/license/jjeffcaii/capybara)\n\nA reverse proxy in Rust, which is inspired from Nginx/OpenResty/Envoy.\n\n\u003e WARNING: still in an active development!!!\n\n## Quick Start\n\n- Prepare Bootstrap YAML\n\n```yaml\nloggers:\n  main:\n    path: ~/capybara/logs/main.log\n\nproviders:\n  - kind: static_file\n    props:\n      path: /your/path/config.yaml\n```\n\n- Prepare config YAML\n\n```yaml\nlisteners:\n  httpbin:\n    listen: 0.0.0.0:80\n    protocol:\n      name: http\n      props:\n        client_header_timeout: 30s\n    pipelines:\n      - name: capybara.pipelines.http.lua\n        props:\n          # write lua script\n          content: |\n            local cnts = 0\n\n            function handle_request_line(ctx,request_line)\n              -- set the upstream here, which links to 'upstreams.httpbin':\n              ctx:set_upstream('upstream://httpbin')\n            end\n\n            function handle_status_line(ctx,status_line)\n              ctx:replace_header('X-Powered-By','capybara')\n\n              -- set a custom response header which counts the requests:\n              cnts = cnts + 1\n              ctx:replace_header('X-Capybara-Requests', tostring(cnts))\n            end\n\nupstreams:\n  httpbin:\n    transport: tcp\n    resolver: default\n    balancer: weighted\n    endpoints:\n      - addr: httpbin.org:443\n        weight: 70\n      - addr: postman-echo.com:443\n        weight: 30\n\n```\n\n- Run \u0026 Test\n\n```shell\n$ cargo run --bin capybara -- run -c bootstrap.yaml\n$ curl -i http://localhost/get\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjeffcaii%2Fcapybara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjjeffcaii%2Fcapybara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjjeffcaii%2Fcapybara/lists"}