#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

#187 in Simulation

Download history 4/week @ 2024-08-26 41/week @ 2024-09-09 18/week @ 2024-09-16 86/week @ 2024-09-23 125/week @ 2024-09-30 44/week @ 2024-10-07 65/week @ 2024-10-14 45/week @ 2024-10-21 57/week @ 2024-10-28 42/week @ 2024-11-04 55/week @ 2024-11-11 53/week @ 2024-11-18 66/week @ 2024-11-25 38/week @ 2024-12-09

160 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