Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/yezz123/grpc-user-agent

gRPC client and server in Rust to handle the specified HTTP user agent analysis
https://github.com/yezz123/grpc-user-agent

demo grcp rust tokio-rs

Last synced: about 1 month ago
JSON representation

gRPC client and server in Rust to handle the specified HTTP user agent analysis

Awesome Lists containing this project

README

        

# User Agent Analyzer

This project implements a gRPC server and client in Rust that can analyze HTTP user agent strings and make a decision whether to block or allow the request.

## Usage

### Running the server

To run the server, execute:

```sh
cargo run --bin server
```

The server will start listening on port 50051.

### Running the client

To run the client, execute:

```sh
cargo run --bin client -- ""
```

Replace `` with the user agent string you want to analyze.

The client will send the user agent string to the server and print the decision to the console.

### Testing

To run the tests, execute:

```sh
cargo test
```

The tests will automatically read user agent strings from `data/user_agents.txt`.