#user-agent #phone-number #fake-data #random #generate #testing #ip-address

fake-rs

A tool for testing native-to-target port latency, using Rust

1 unstable release

0.1.0 Jan 18, 2024

#182 in Simulation

Download history 28/week @ 2024-07-13 12/week @ 2024-07-20 65/week @ 2024-07-27 63/week @ 2024-08-03 27/week @ 2024-08-10 22/week @ 2024-08-17 6/week @ 2024-08-24 38/week @ 2024-09-07 18/week @ 2024-09-14 79/week @ 2024-09-21 134/week @ 2024-09-28 41/week @ 2024-10-05 56/week @ 2024-10-12 50/week @ 2024-10-19 49/week @ 2024-10-26

205 downloads per month

MIT license

525KB
5K SLoC

Table of Contents↗️

fake-rs


fake-rs is a Rust library for generating fake data such as random user agents, names, phone numbers, and IP addresses. It's designed to provide a simple and easy-to-use interface for developers to quickly generate mock data for testing, simulation, and other scenarios where random data is needed.

Features

  • User Agent Generation: Randomly select a user agent from a predefined list.
  • Name Generation: Randomly generate names.
  • Phone Number Generation: Generate properly formatted random phone numbers.
  • IP Address Generation: Generate random IPv4 addresses.

Usage

[dependencies]
fake-rs = { version = "0.1.0", features = ["user-agent", "name", "phone", "ip"] }

Each module provides one or more functions to generate specific types of data. Here are some usage examples:

User Agent Generation

use fake_rs::get_random_user_agent;
let user_agent = get_random_user_agent();
let user_agent_chrome = get_chrome_user_agent();

Name Generation

use fake_rs::generate_name;
let name = generate_name();

Phone Number Generation

use fake_rs::generate_phone;
let phone_number = generate_phone();

IP Address Generation

use fake_rs::generate_ip;
let ip_address = generate_ip();

Dependencies