Rust library that helps you change the domain of the link to another domain πŸ¦€πŸ”

Overview

domain_changer

Rust report

Rust library that helps you to change the domain of the link to another domain, the library helps with privacy. It can be used to change the domain of sites that do not care about privacy to another that does.

Examples

Parse String

Parse the string and convert the old urls to new one

Note: You can change the domains as you want

use domain_changer::parse_string;
use domain_changer::types::Config;

let text: String = "Wellcome to my youtube channel: https://www.youtube.com/channel/UCeRbJsc8cl7xBwT3jIxaAdg And my twitter is: twitter.com/Awiteb".to_string();
let config: Config = Config::default();
assert_eq!(parse_string(&config, text),
           "Wellcome to my youtube channel: https://piped.kavin.rocks/channel/UCeRbJsc8cl7xBwT3jIxaAdg And my twitter is: https://nitter.net/Awiteb".to_string()
);

Extract Domains

You can extract domains domains from string if any (Just the domain you add it to config)

use domain_changer::extract_old_domains;
use domain_changer::types::{Config, Domain};

let config: Config = Config::default();
let text: String = String::from(
    "Hi i hate youtube.com and https://twitter.com what about you?"
);
assert_eq!(
    extract_old_domains(&config, text),
    vec![
        &Domain::try_from(("https://youtube.com/", "https://piped.kavin.rocks/")).unwrap(),
        &Domain::try_from(("https://twitter.com/", "https://nitter.net/")).unwrap()
    ]
);

Serialize and Deserialize (json feature)

Serialize and deserialize from/to json in Domain struct and Config

Note: Need json feature

Domain

use domain_changer::types::{Domain, ToFromJson};

let domain: Domain = Domain::try_from(("https://twitter.com/", "https://nitter.net/")).unwrap();
assert_eq!(domain.to_json().unwrap(), "{\"old\":\"https://twitter.com/\",\"new\":\"https://nitter.net/\"}");
assert_eq!(Domain::from_json("{\"old\":\"https://twitter.com/\",\"new\":\"https://nitter.net/\"}").unwrap(), domain);
assert!(Domain::from_json("{\"old\":\"twitter.com/\",\"new\":\"nitter.net/\"}").is_err());

Config

use domain_changer::types::{Config, Domain, ToFromJson};

let config: Config = Config::new(vec![Domain::try_from(("https://twitter.com/", "https://nitter.net/")).unwrap()]);
assert_eq!(
    config.to_json().unwrap(),
    "{\"domains\":[{\"old\":\"https://twitter.com/\",\"new\":\"https://nitter.net/\"}]}".to_string()
);

assert_eq!(
    Config::from_json("{\"domains\":[{\"old\":\"https://twitter.com/\",\"new\":\"https://nitter.net/\"}]}").unwrap(),
    config
);

Donating

Currency Address
Binance BNB BEP20 0xD89c146B03B72191be91064D313610981dCAF6d4
USD Coin USDC BEP20 0xD89c146B03B72191be91064D313610981dCAF6d4
Bitcoin BTC bc1q0ltmqmsc4qs740ssyf9k9jq99nwxtqu8aupmdj
Bitcoin Cash BCH qrpm6zyte3d4z2u9r24l04m3havc2wd9vgqlz8sjgr

Contributors

License

The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.

You might also like...
Automatically updates your Cloudflare DNS records for specific zones. Especially useful if you have dynamic IP address

Cloudflare DNS updater What does it do? Cloudflare DNS updater updates specified dns records for specified zones effortlessly and automatically. It wa

Hotwire allows you to study network traffic of a few popular protocols in a simple way
Hotwire allows you to study network traffic of a few popular protocols in a simple way

Hotwire Hotwire is a gtk GUI application that leverages the wireshark and tshark infrastructure to capture traffic and explore the contents of tcpdump

γ€ŒπŸ§±γ€Test a list of payloads and see if you can bypass it
γ€ŒπŸ§±γ€Test a list of payloads and see if you can bypass it

γ€Œ 🧱 」About TTWAF TTWAF, or Test This WAF, is a Web Application Firewall (WAF) bypass testing tool. You can test a list of payloads like XSS, LFI, RCE

Fake rest is a fake API generator using a config file to help you develop clients.

About Fake-Rest is a fake API generator using a config file to help you develop clients. It's EASY AS HELL. Usage It's very simple to use. just create

The gRPC library for Rust built on C Core library and futures

gRPC-rs gRPC-rs is a Rust wrapper of gRPC Core. gRPC is a high performance, open source universal RPC framework that puts mobile and HTTP/2 first. Sta

A Β΅TP (Micro/uTorrent Transport Library) library implemented in Rust

rust-utp A Micro Transport Protocol library implemented in Rust. API documentation Overview The Micro Transport Protocol is a reliable transport proto

A library to work with CIDRs in rust

ipnetwork This is a library to work with IPv4 and IPv6 CIDRs in Rust Run Clippy by doing rustup component add clippy cargo clippy Installation This c

Nanomsg library for Rust

Nanomsg Documentation Nanomsg is a modern messaging library that is the successor to ZeroMQ, written in C by Martin Sustrik and colleagues. The nanoms

A Constrained Application Protocol(CoAP) library implemented in Rust.

coap-rs A fast and stable Constrained Application Protocol(CoAP) library implemented in Rust. Features: CoAP core protocol RFC 7252 CoAP Observe optio

Releases(v0.1.4)
  • v0.1.4(Apr 14, 2022)

  • v0.1.3(Mar 24, 2022)

  • v0.1.2(Mar 24, 2022)

    What's Changed

    • ✨: Json feature by @TheAwiteb in https://github.com/TheAwiteb/domain_changer/pull/3

    Full Changelog: https://github.com/TheAwiteb/domain_changer/compare/v0.1.1...v0.1.2

    Source code(tar.gz)
    Source code(zip)
  • v0.1.1(Mar 22, 2022)

    What's Changed

    • 🧹: Documentation improvements by @TheAwiteb in https://github.com/TheAwiteb/domain_changer/pull/2

    Full Changelog: https://github.com/TheAwiteb/domain_changer/compare/v0.1.0...v0.1.1

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Mar 20, 2022)

    What's Changed

    • πŸ“¦: Crate initialization by @TheAwiteb in https://github.com/TheAwiteb/domain_changer/pull/1

    Full Changelog: https://github.com/TheAwiteb/domain_changer/commits/v0.1.0

    Source code(tar.gz)
    Source code(zip)
Owner
TheAwiteb
Some programmer. vec!['πŸ¦€','🐍'].
TheAwiteb
πŸ“‘Proxy HTTP/1.1 requests over a sensitive point-to-point link

ptproxy Motivation What's this? Why do I need this? What's a sensitive network link? What's wrong with a VPN? What's wrong with HTTP[S]? What's wrong

Alba Mendez 5 Jul 26, 2023
Volo is a high-performance and strong-extensibility Rust RPC framework that helps developers build microservices.

Volo is a high-performance and strong-extensibility Rust RPC framework that helps developers build microservices.

CloudWeGo 1.3k Jan 2, 2023
Super Fast Sub-domain Takeover Detection!

NtHiM - Super Fast Sub-domain Takeover Detection Installation Method 1: Using Pre-compiled Binaries The pre-compiled binaries for different systems ar

Binit Ghimire 326 Dec 31, 2022
An application for downloading public domain ebooks from irc.

An application for downloading public domain ebooks from irc. Despite the name it is not to be used for illegal activities and I am in no way responsible for any such use.

null 33 Nov 25, 2022
Implementation of algorithms for Domain Name System (DNS) Cookies construction

DNS Cookie RFC7873 left the construction of Server Cookies to the discretion of the DNS Server (implementer) which has resulted in a gallimaufry of di

Rushmore Mushambi 2 Feb 4, 2022
YAC (Yac is Another Chat) is an example of Chat using WebSocket.

YAC (Yac is Another Chat) is an example of Chat using WebSocket. Because often the example you find in internet are "not so production ready", I would like to try to implement something more robust.

Tommaso Allevi 8 May 24, 2022
Yet Another File Transfer Protocol.

yaftp Yet Another File Transfer Protocol. Build & Run $> cargo build --release Features C2C Lightweight Per something per session High performence Res

b23r0 20 Sep 22, 2022
Yet another youtube (and more) down loader

Yet another youtube (and more) down loader

Cthulhux 203 Dec 25, 2022
Tiny CLI application in rust to scan ports from a given IP and find how many are open. You can also pass the amount of threads for that scan

Port Scanner A simple multi-threaded port scanner written in Rust. Usage Run the port scanner by providing the target IP address and optional flags. $

nicolas lopes 4 Aug 29, 2023
Docker containers on a synthetic network. Run applications in a context that lets you manipulate their network conditions.

Synthetic Network Docker containers on a synthetic network. Run applications in a context that lets you manipulate their network conditions. Dependenc

Daily 58 Dec 15, 2022