chrootable-https

Crates.iochrootable-https
lib.rschrootable-https
version0.16.0
sourcesrc
created_at2018-09-15 03:22:26.16685
updated_at2020-09-25 17:49:37.459769
descriptionSandbox friendly https client
homepage
repositoryhttps://github.com/kpcyrd/chrootable-https
max_upload_size
id84795
size138,494
(kpcyrd)

documentation

README

chrootable-https Build Status crates.io docs.rs

If you ever tried chrooting an https client into an empty folder you probably ran into two problems:

  • /etc/resolv.conf doesn't exist in an empty folder
  • ca-certificates doesn't exist in an empty folder

This crate is working around those issues by using:

  • trust-dns so the recursor can be specified expliticly
  • rustls and webpki-roots to avoid loading certificates from disk

We're also trying to avoid C dependencies and stick to safe rust as much as possible.

Examples

extern crate chrootable_https;
use chrootable_https::{Resolver, Client};

let resolver = Resolver::cloudflare();
let client = Client::new(resolver);

let reply = client.get("https://httpbin.org/anything").expect("request failed");
println!("{:#?}", reply);

License

LGPL-3+

Commit count: 83

cargo fmt