proxytester

Crates.ioproxytester
lib.rsproxytester
version0.1.0
sourcesrc
created_at2024-07-26 16:03:43.022562
updated_at2024-07-26 16:03:43.022562
descriptionA simple and fast proxy tester
homepage
repositoryhttps://github.com/einstein8612/proxytester
max_upload_size
id1316348
size100,914
Joey Li (einstein8612)

documentation

README

Proxy Tester

This repository contains a proxy tester tool that allows you to test the functionality and performance of different proxy servers.

Note: This is a tool made for personal use, therefore features won't exactly align with what you might require.

Installation

Prerequisites:

  • rust
  • libcurl (This will be preinstalled by default on lots of OS's. Most likely you can ignore this prerequisite. Otherwise, installing cURL will do the trick.)

To install the proxy tester, there are several options:

ArchLinux

Arch users may download ProxyTester from the AUR.

Cargo (crates.io)

You can install the latest published version on Crates.io by using:

$ cargo install proxytester

Cargo (Github source)

You can install the latest published version on Crates.io by using:

$ cargo install --git https://github.com/einstein8612/proxytester.git --tag v0.1.0

Usage

To see how to use the proxytester, you can view the help menu.

$ proxytester --help

Usage: proxytester.exe [OPTIONS] <FILES>...

Arguments:
  <FILES>...  File to read the proxies from

Options:
  -u, --url <URL>             The URL to test the proxies against [default: https://1.1.1.1]
  -w, --workers <WORKERS>     How many workers to use, ergo how many proxies to test at once [default: 1]
  -t, --timeout <TIMEOUT_MS>  Timeout for each request in milliseconds [default: 5000]
  -h, --help                  Print help
  -V, --version               Print version

Examples

$ proxytester --url="http://1.1.1.1" proxies.txt
$ proxytester --workers=5 --url="http://1.1.1.1" proxies.txt

Lib Usage

You can also use the ProxyTester as a library, and it was mainly built for this purpose.

let mut proxy_tester = ProxyTesterOptions::default()
    .set_url("http://1.1.1.1".to_owned())
    .set_workers(5)
    .set_timeout(Duration::from_millis(5000))
    .build();

let recv: Receiver<ProxyTest> = proxy_tester.run().await;

// You use the recv channel to read all results as they come in.
// ...

Contributing

Contributions are welcome, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Commit count: 0

cargo fmt