Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/yezz123/grpc-user-agent
- Owner: yezz123
- Created: 2024-04-11T23:30:39.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-07-01T00:36:37.000Z (6 months ago)
- Last Synced: 2024-09-15T21:35:57.542Z (3 months ago)
- Topics: demo, grcp, rust, tokio-rs
- Language: Rust
- Homepage:
- Size: 105 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
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`.