Giter Site home page Giter Site logo

mosquito's Introduction

Mosquito 🪰 crates.io

Mosquito is a simple HTTP server that prints the parameters of incoming requests to the console in a beautiful manner.

Introduction

Mosquito was born out of the necessity to ensure the accuracy of requests in various contexts, particularly within the realm of mobile development and gaming platforms. As applications grow more complex, the ability to monitor and validate the correctness of requests becomes paramount. Whether working with React Native or building analytics tools for gaming, Mosquito serves as a reliable tool to intercept and log HTTP requests. By visualizing these requests, developers can gain insights, diagnose issues, and confirm that everything is functioning as intended, enhancing the overall quality and reliability of the applications.

Requirements

  • Rust Programming Language
  • Cargo package manager

The following Rust crates are used in this project:

  • hyper: For creating the HTTP server.
  • clap: For handling command-line arguments.
  • serde_json: For JSON processing.

Installation

Using Cargo

You can install Mosquito directly from crates.io by running the following command:

cargo install mosquito

Downloading from GitHub Releases

Alternatively, you can download the compiled binary from the Releases section of the GitHub repository.

Building from Source

Clone the repository and build the project using Cargo:

cargo build --release

The compiled binary will be available in the target/release directory.

Usage

Using Cargo

To start the server, run the following command in the project directory:

cargo run -- --host {HOST_IP} --port {PORT}

Using the Compiled Binary

After compiling the project, you can run the mosquito binary directly. Replace the path with the location of the compiled binary:

mosquito --host {HOST_IP} --port {PORT}
  • {HOST_IP}: The IP address the server will connect to. Optional, defaults to the local IP address.
  • {PORT}: The port the server will listen on. Optional, defaults to 80.

Example:

mosquito --host 0.0.0.0 --port 8080

These commands start the server at http://0.0.0.0:8080.

Logs

The server prints the timestamp, method, URI, and content of each request to the console. If the content is in JSON format, it is printed in a readable manner.

Contributing

This project is open-source and awaits your contributions. Feel free to make changes and send a pull request.

License

This project is licensed under the MIT license. For more details, see the LICENSE file.


README Created with ChatGPT

mosquito's People

Contributors

kubilaysalih avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.