#proxy #allowlist #auto #service #api #proxies #data-inpulse

proxier

Auto proxy whitelist and delist crate for 3rd party services

3 releases

new 0.1.2 Oct 7, 2024
0.1.1 Oct 4, 2024
0.1.0 Oct 4, 2024

#1394 in Web programming

Download history 387/week @ 2024-10-04

387 downloads per month

MIT license

24KB
524 lines

proxier

The auto white-listing proxy API lib for Rust.

Services

  • WebShare
  • IpRoyale
  • DataInpulse

cargo add proxier

Example

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

#[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();

    // setup all the configs for the proxies.

    proxier.setup_proxies(Some(iproyale_config, webshare_config, datainpulse_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

Dependencies

~4–15MB
~194K SLoC