imvishudevsingh@gmail.com

Rust Based Network Information Program For Linux - 15/11/2024

A Rust tool for quick network diagnostics: geographic info, local IP, and speed tests.

Network Info Program

A Rust-based application that provides key network information, including geographic details, local IP address, and internet speed test results. This program is designed for developers, network administrators, and enthusiasts looking for a quick way to diagnose and analyze network details.

Features

Dependencies

To run this program, ensure the following dependencies are installed:

Rust Dependencies:

Install them using Cargo:

cargo add reqwest serde tokio

System Requirements:

sudo apt install speedtest-cli

Installation

Follow these steps to set up the program:

  1. Clone the repository:

    git clone https://github.com/teztarrar/network_info.git
    cd network-info
    
  2. Build the project:

    cargo build --release
    
  3. Install the required system dependencies: Ensure speedtest-cli is installed as outlined in the dependencies section.

Usage

To use the program, run the following command:

cargo run --release

What It Does:

Example Output

Geographic Information:
IP: 192.168.x.x
ISP: Your ISP
Country: United States
Region: California
City: San Francisco

Local IP Address:
192.168.1.100

Internet Speed Test:
Download: 50.00 Mbps
Upload: 10.00 Mbps

Advanced Usage

Modify API URL

To use a custom API for geographic information, edit the API_URL variable in the source code.

Customize Speed Test Tool

Replace speedtest-cli with an alternative CLI tool if needed. Update the command in the relevant section of the code.

Common Issues

Permission Denied for speedtest-cli

Ensure speedtest-cli is installed and executable:

sudo chmod +x /usr/bin/speedtest-cli

Network Connectivity Problems

Check your internet connection. The program requires connectivity to fetch geographic information and perform speed tests.

Contributing

Contributions are welcome! Feel free to:

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

Developed with ❤️ using Rust. This program simplifies network diagnostics by combining fast performance with accurate results.