{"id":16157669,"url":"https://github.com/theawiteb/salvo-captcha","last_synced_at":"2025-04-07T01:40:59.373Z","repository":{"id":219807897,"uuid":"750012592","full_name":"TheAwiteb/salvo-captcha","owner":"TheAwiteb","description":"[Mirror] A captcha middleware for Salvo framework.","archived":false,"fork":false,"pushed_at":"2025-01-13T18:43:57.000Z","size":96,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T07:15:49.823Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://git.4rs.nl/awiteb/salvo-captcha","language":"Rust","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/TheAwiteb.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},"funding":{"github":"TheAwiteb"}},"created_at":"2024-01-29T20:26:28.000Z","updated_at":"2025-01-19T01:15:49.000Z","dependencies_parsed_at":"2024-01-29T22:25:19.026Z","dependency_job_id":"ac4a0544-72f3-482d-8c93-14da311897d5","html_url":"https://github.com/TheAwiteb/salvo-captcha","commit_stats":null,"previous_names":["theawiteb/salvo-captcha"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAwiteb%2Fsalvo-captcha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAwiteb%2Fsalvo-captcha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAwiteb%2Fsalvo-captcha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAwiteb%2Fsalvo-captcha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheAwiteb","download_url":"https://codeload.github.com/TheAwiteb/salvo-captcha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247578627,"owners_count":20961270,"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":[],"created_at":"2024-10-10T01:50:16.230Z","updated_at":"2025-04-07T01:40:59.353Z","avatar_url":"https://github.com/TheAwiteb.png","language":"Rust","funding_links":["https://github.com/sponsors/TheAwiteb"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# salvo-captcha\n\nA captcha middleware for [salvo](salvo.rs) framework. With fully customizable captchas generator, storage, and finders\n\n[![salvo-captcha-video](https://i.suar.me/9NjJ1)](https://ibb.co/XVRVMZj)\n\n\u003c/div\u003e\n\n## Add to your project\n\nFirst, add the following to your `Cargo.toml`:\n\n```toml\n[dependencies]\nsalvo-captcha = \"0.4\"\n```\n\nOr use [`cargo add`] to add the dependency to your `Cargo.toml`:\n\n```sh\n$ cargo add salvo-captcha\n```\n\n## Usage\n\nSee the [examples] directory for a complete example. You can also see the implemented generators, storages, and finders in the source code.\n\n## Storage\n\nThere is a default storage, which is [`MemoryStorage`] it's a simple in-memory storage. You can implement your own storage by implementing the [`CaptchaStorage`] trait.\n\n### Cacache Storage\n\nA high-performance, concurrent, content-addressable disk cache. The storage is based on [`cacache-rs`] crate. to use it, you need to enable the `cacache-storage` feature.\n\n```toml\n[dependencies]\nsalvo-captcha = { version = \"0.3\", features = [\"cacache-storage\"] }\n```\n\n## Captcha Finder\n\nWe provide fully customizable query parameters, form fields, and headers to find the captcha token and the captcha answer. You can implement your own finder by implementing the [`CaptchaFinder`] trait.\n\n## Captcha Generator\n\nWe provide [`SimpleCaptchaGenerator`] which is a simple captcha generator based on the [`captcha`] crate, you can enable it by enabling the `simple-generator` feature.\n\n```toml\n[dependencies]\nsalvo-captcha = { version = \"0.3\", features = [\"simple-generator\"] }\n```\n\nYou can implement your own generator by implementing the [`CaptchaGenerator`] trait.\n\n### Captcha name and difficulty\n\nIn this table, you can see the difference between the difficulties and the name of the captcha.\n\n|      Name       |                 Easy                 |                Medium                |                 Hard                 |\n| :-------------: | :----------------------------------: | :----------------------------------: | :----------------------------------: |\n|     Normal      | ![Simple](https://i.suar.me/edwBG/s) | ![Simple](https://i.suar.me/NJmg0/s) | ![Simple](https://i.suar.me/OJK7M/s) |\n| SlightlyTwisted | ![Simple](https://i.suar.me/1JaxG/s) | ![Simple](https://i.suar.me/l7zBl/s) | ![Simple](https://i.suar.me/qXAlx/s) |\n|   VeryTwisted   | ![Simple](https://i.suar.me/dO78z/s) | ![Simple](https://i.suar.me/PXBwK/s) | ![Simple](https://i.suar.me/8edgE/s) |\n\n## Mirrors\n\n- Github (\u003chttps://github.com/TheAwiteb/salvo-captcha\u003e)\n- Codeberg (\u003chttps://codeberg.org/awiteb/salvo-captcha\u003e)\n\n### Main Repository\n\n- My Git (\u003chttps://git.4rs.nl/awiteb/salvo-captcha\u003e)\n\n## License\n\nThis project is licensed under the MIT license for more details see [LICENSE] or \u003chttp://opensource.org/licenses/MIT\u003e.\n\n[`MemoryStorage`]: https://docs.rs/salvo-captcha/latest/salvo_captcha/struct.MemoryStorage.html\n[`CaptchaStorage`]: https://docs.rs/salvo-captcha/latest/salvo_captcha/trait.CaptchaStorage.html\n[`cacache-rs`]: https://github.com/zkat/cacache-rs\n[`SimpleCaptchaGenerator`]: https://docs.rs/salvo-captcha/latest/salvo_captcha/struct.SimpleCaptchaGenerator.html\n[`CaptchaGenerator`]: https://docs.rs/salvo-captcha/latest/salvo_captcha/trait.CaptchaGenerator.html\n[`CaptchaFinder`]: https://docs.rs/salvo-captcha/latest/salvo_captcha/trait.CaptchaFinder.html\n[examples]: https://git.4rs.nl/awiteb/salvo-captcha/src/branch/master/examples\n[`captcha`]: https://github.com/daniel-e/captcha\n[LICENSE]: https://git.4rs.nl/awiteb/salvo-captcha/src/branch/master/LICENSE\n[`cargo add`]: https://doc.rust-lang.org/cargo/commands/cargo-add.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheawiteb%2Fsalvo-captcha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheawiteb%2Fsalvo-captcha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheawiteb%2Fsalvo-captcha/lists"}