README and LICENSE

This commit is contained in:
YCCDSZXH 2024-08-19 20:52:38 +08:00
parent b781e95ed6
commit 7827a9432b
2 changed files with 68 additions and 1 deletions

21
LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2024 YCCD
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@ -1 +1,47 @@
# proxy-checker-rs # Proxy Checker
This repository provides an open-source server-side API for detecting if a client is using a proxy. The detection method compares the Round-Trip Time (RTT) of both the TLS and TCP layers. This differential analysis helps identify the presence of a proxy.
## Usage
Clone the repository:
```bash
git clone https://github.com/YCCDSZXH/proxy-checker-rs.git
cd proxy-checker-rs
```
Build
```bash
cargo b
```
Configure certificate
```bash
openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout server.key -out server.crt
```
Run the server:
```bash
cargo r
```
Make a request to the detection endpoint:
```bash
curl http://localhost:8443 -k
```
If you use self generate certificate, you need `-k` to skip certificate verify
The API will return a JSON response indicating whether a proxy was detected.
## Contributing
Contributions are welcome! Feel free to submit issues, fork the repository, and create pull requests.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.