{"id":16157663,"url":"https://github.com/theawiteb/domain_changer","last_synced_at":"2025-07-17T10:37:31.804Z","repository":{"id":39619510,"uuid":"472067695","full_name":"TheAwiteb/domain_changer","owner":"TheAwiteb","description":"Rust library that helps you change the domain of the link to another domain 🦀🔐","archived":false,"fork":false,"pushed_at":"2023-03-04T03:29:56.000Z","size":84,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-09T07:58:25.477Z","etag":null,"topics":["domain","domain-changer","rust"],"latest_commit_sha":null,"homepage":"https://docs.rs/domain_changer","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","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}},"created_at":"2022-03-20T18:28:08.000Z","updated_at":"2022-03-28T21:39:43.000Z","dependencies_parsed_at":"2024-10-27T19:13:02.678Z","dependency_job_id":"a03fe2a6-ec4d-4488-8358-6df9f4368ba4","html_url":"https://github.com/TheAwiteb/domain_changer","commit_stats":{"total_commits":46,"total_committers":2,"mean_commits":23.0,"dds":0.06521739130434778,"last_synced_commit":"6799dec4ce6e3b0116d9658f87968e7c94d0d2b8"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/TheAwiteb/domain_changer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAwiteb%2Fdomain_changer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAwiteb%2Fdomain_changer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAwiteb%2Fdomain_changer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAwiteb%2Fdomain_changer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TheAwiteb","download_url":"https://codeload.github.com/TheAwiteb/domain_changer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TheAwiteb%2Fdomain_changer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265596023,"owners_count":23794826,"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":["domain","domain-changer","rust"],"created_at":"2024-10-10T01:50:15.500Z","updated_at":"2025-07-17T10:37:31.499Z","avatar_url":"https://github.com/TheAwiteb.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# domain_changer\n\n  \u003ca href=\"https://github.com/TheAwiteb/domain_changer/actions\"\u003e\n    \u003cimg src=\"https://github.com/TheAwiteb/domain_changer/workflows/Continuous%20integration/badge.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://docs.rs/domain_changer/latest/domain_changer/\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/docs-docs.rs-orange\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/domain_changer\"\u003e\n    \u003cimg src=\"https://img.shields.io/crates/v/domain_changer.svg\"\u003e\n  \u003c/a\u003e\n \u003ca href=\"https://rust-reportcard.xuri.me/report/github.com/TheAwiteb/domain_changer\"\u003e\n    \u003cimg src=\"https://rust-reportcard.xuri.me/badge/github.com/TheAwiteb/domain_changer\" alt=\"Rust report\"\u003e\n  \u003c/a\u003e\n\nRust library that helps you to **change the domain of the link to another domain**, the library helps with privacy.\nIt can be used to change the domain of sites that do not care about privacy to another that does.\n\n\n## Examples\n### Parse String\nParse the string and convert the old urls to new one\n\u003e Note: You can change the domains as you want\n```rust\nuse domain_changer::parse_string;\nuse domain_changer::types::Config;\n\nlet text: String = \"Wellcome to my youtube channel: https://www.youtube.com/channel/UCeRbJsc8cl7xBwT3jIxaAdg And my twitter is: twitter.com/Awiteb\".to_string();\nlet config: Config = Config::default();\nassert_eq!(parse_string(\u0026config, text),\n           \"Wellcome to my youtube channel: https://piped.kavin.rocks/channel/UCeRbJsc8cl7xBwT3jIxaAdg And my twitter is: https://nitter.net/Awiteb\".to_string()\n);\n```\n\n### Extract Domains\nYou can extract domains from string if any (Just the domain you add it to config)\n```rust\nuse domain_changer::extract_old_domains;\nuse domain_changer::types::{Config, Domain};\n\nlet config: Config = Config::default();\nlet text: String = String::from(\n    \"Hi i hate youtube.com and https://twitter.com what about you?\"\n);\nassert_eq!(\n    extract_old_domains(\u0026config, text),\n    vec![\n        \u0026Domain::try_from((\"https://youtube.com/\", \"https://piped.kavin.rocks/\")).unwrap(),\n        \u0026Domain::try_from((\"https://twitter.com/\", \"https://nitter.net/\")).unwrap()\n    ]\n);\n```\n\n### Serialize and Deserialize (json feature)\nSerialize and deserialize from/to json in Domain struct and Config\n\u003e Note: Need `json` feature\n#### Domain\n```rust\nuse domain_changer::types::{Domain, ToFromJson};\n\nlet domain: Domain = Domain::try_from((\"https://twitter.com/\", \"https://nitter.net/\")).unwrap();\nassert_eq!(domain.to_json().unwrap(), \"{\\\"old\\\":\\\"https://twitter.com/\\\",\\\"new\\\":\\\"https://nitter.net/\\\"}\");\nassert_eq!(Domain::from_json(\"{\\\"old\\\":\\\"https://twitter.com/\\\",\\\"new\\\":\\\"https://nitter.net/\\\"}\").unwrap(), domain);\nassert!(Domain::from_json(\"{\\\"old\\\":\\\"twitter.com/\\\",\\\"new\\\":\\\"nitter.net/\\\"}\").is_err());\n```\n#### Config\n```rust\nuse domain_changer::types::{Config, Domain, ToFromJson};\n\nlet config: Config = Config::new(vec![Domain::try_from((\"https://twitter.com/\", \"https://nitter.net/\")).unwrap()]);\nassert_eq!(\n    config.to_json().unwrap(),\n    \"{\\\"domains\\\":[{\\\"old\\\":\\\"https://twitter.com/\\\",\\\"new\\\":\\\"https://nitter.net/\\\"}]}\".to_string()\n);\n\nassert_eq!(\n    Config::from_json(\"{\\\"domains\\\":[{\\\"old\\\":\\\"https://twitter.com/\\\",\\\"new\\\":\\\"https://nitter.net/\\\"}]}\").unwrap(),\n    config\n);\n```\n\n## Donating\n\n| Currency                | Address                                          |\n|-------------------------|--------------------------------------------------|\n| Binance **BNB BEP20**   | ```0xD89c146B03B72191be91064D313610981dCAF6d4``` |\n| USD Coin **USDC BEP20** | ```0xD89c146B03B72191be91064D313610981dCAF6d4``` |\n| Bitcoin **BTC**         | ```bc1q0ltmqmsc4qs740ssyf9k9jq99nwxtqu8aupmdj``` |\n| Bitcoin Cash **BCH**    | ```qrpm6zyte3d4z2u9r24l04m3havc2wd9vgqlz8sjgr``` |\n\n## Contributors\n\u003ca href=\"https://github.com/TheAwiteb/domain_changer/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=TheAwiteb/domain_changer\" /\u003e\n\u003c/a\u003e\n\n## License\nThe [GNU Affero General Public](https://www.gnu.org/licenses/agpl-3.0.en.html) License is a free, \ncopyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheawiteb%2Fdomain_changer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheawiteb%2Fdomain_changer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheawiteb%2Fdomain_changer/lists"}