#proxy #allowlist #auto #service #api #proxies #ip

proxier

Auto proxy whitelist and delist crate for 3rd party services

8 releases

0.1.7 Nov 2, 2024
0.1.6 Nov 2, 2024
0.1.2 Oct 7, 2024

#1367 in Web programming

Download history 180/week @ 2024-09-30 255/week @ 2024-10-07 15/week @ 2024-10-14 411/week @ 2024-10-28 175/week @ 2024-11-04

609 downloads per month

MIT license

29KB
633 lines

proxier

The auto white-listing proxy API lib for Rust.

Services

cargo add proxier

Example

use proxier::proxies::{Proxier, IPRoyaleConfiguration, WebShareConfiguration, DatainpulseConfiguration, EvomiConfiguration};

#[tokio::main]
async fn main() {
    // replace with the server ip
    let mut proxier = Proxier::new("124.32.334.2");

    let iproyale_config = IPRoyaleConfiguration::default();
    let webshare_config = WebShareConfiguration::default();
    let datainpulse_config = DatainpulseConfiguration::default();
    let evomi_config = EvomiConfiguration::default();

    // setup all the configs for the proxies.

    proxier.setup_proxies(Some(iproyale_config), Some(webshare_config), Some(datainpulse_config), Some(evomi_config)).await;

    // whitelist the server
    proxier.whitelist().await;

    // add signals with startup on the server to delist after shutdown using tokio::select etc.

    // delist the proxiers for the server after.
    proxier.delist().await;
}

ENV

The following env variables are required to set.

Webshare

PROXY_SHARE_PASSWORD

IPRoyale

IP_ROYALE_API_TOKEN

Datainpulse

DATA_INPULSE_USERNAME DATA_INPULSE_PASSWORD

Evomi

EVOMI_API_TOKEN

Dependencies

~4–15MB
~192K SLoC